From owner-p4-projects Fri Sep 6 15:10:34 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB90637B401; Fri, 6 Sep 2002 15:10:21 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55F1137B400 for ; Fri, 6 Sep 2002 15:10:21 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA54043E77 for ; Fri, 6 Sep 2002 15:10:20 -0700 (PDT) (envelope-from mini@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g86MAKJU045900 for ; Fri, 6 Sep 2002 15:10:20 -0700 (PDT) (envelope-from mini@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g86MAKwl045895 for perforce@freebsd.org; Fri, 6 Sep 2002 15:10:20 -0700 (PDT) Date: Fri, 6 Sep 2002 15:10:20 -0700 (PDT) Message-Id: <200209062210.g86MAKwl045895@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to mini@freebsd.org using -f From: Jonathan Mini Subject: PERFORCE change 17172 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17172 Change 17172 by mini@mini_stylus on 2002/09/06 15:09:44 Remove extra UCF_xxx flags we are no longer using. Affected files ... .. //depot/projects/kse/lib/libc/gen/swapcontext.c#6 edit .. //depot/projects/kse/sys/kern/kern_thread.c#103 edit .. //depot/projects/kse/sys/sys/ucontext.h#8 edit Differences ... ==== //depot/projects/kse/lib/libc/gen/swapcontext.c#6 (text+ko) ==== @@ -53,7 +53,6 @@ ret = getcontext(oucp); if ((ret == 0) && !(oucp->uc_flags & UCF_SWAPPED)) { oucp->uc_flags |= UCF_SWAPPED; - oucp->uc_busy = 0; ret = setcontext(ucp); } return (ret); ==== //depot/projects/kse/sys/kern/kern_thread.c#103 (text+ko) ==== @@ -508,15 +508,6 @@ struct thread *td, struct trapframe *frame) { int discard, error; - struct thread_mailbox *tmp; - - /* - * If we are in a critical section, return to this thread. - */ - tmp = (struct thread_mailbox *)fuword(&ke->ke_mailbox->km_curthread); - if ((tmp != NULL) && - (fuword(&tmp->tm_context.uc_flags) & UCF_CRITICAL)) - return (0); /* * Save the thread's context, and link it @@ -535,14 +526,13 @@ /* * Decide whether to perfom an upcall now. */ - discard = 0; - /* Make sure there are no other threads waiting to run. */ - if (TAILQ_FIRST(&kg->kg_runq)) + if (TAILQ_FIRST(&kg->kg_runq)) { /* * Another thread in this KSEG needs to run. * Switch to it instead of performing an upcall, - * abondoning this thread. + * abondoning this thread. Perform the upcall + * later; discard this thread for now. * * XXXKSE - As for the other threads to run; * we COULD rush through all the threads @@ -552,14 +542,6 @@ * What is OUR priority? The priority of the highest * sycall waiting to be returned? * For now, just let another KSE run (easiest). - */ - discard = 1; - - /* Discard thread or mark for upcall. */ - if (discard) { - /* - * Perform the upcall later; discard this thread for - * now. * * XXXKSE Future enhancement: Shove threads in this * state onto a list of completed threads hanging ==== //depot/projects/kse/sys/sys/ucontext.h#8 (text+ko) ==== @@ -48,15 +48,8 @@ struct __ucontext *uc_link; stack_t uc_stack; - intptr_t uc_busy; int uc_flags; -#define UCF_SKIPSIGMASK 0x00000001 /* Don't set/restore signal mask. */ -#define UCF_OBEYBUSY 0x00000002 /* Respect uc_busy marker. */ -#define UCF_SWAPPED 0x00000080 /* Used by swapcontext(3). */ -#define UCF_CRITICAL 0x00000200 /* In a critical section. */ -#define UCF_CLEARSTATE 0x00000400 /* Clear UCF_STATE in setcontext. */ -#define UCF_STATE 0x0000ff00 /* State-related flags. */ -#define UCF_OPTIONS 0x000000ff /* Behaviour-related flags. */ +#define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */ int __spare__[4]; } ucontext_t; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message