Date: Fri, 6 Sep 2002 15:10:20 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 17172 for review Message-ID: <200209062210.g86MAKwl045895@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209062210.g86MAKwl045895>