Date: Sat, 31 Aug 2002 19:39:39 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 16880 for review Message-ID: <200209010239.g812ddXj074973@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16880 Change 16880 by mini@mini_stylus on 2002/08/31 19:39:07 Revert previous change (accidentally committed). Affected files ... .. //depot/projects/kse/sys/kern/kern_thread.c#97 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_thread.c#97 (text+ko) ==== @@ -1,3 +1,4 @@ +//depot/projects/kse/sys/kern/kern_thread.c#95 - edit change 16871 (text+ko) /* * Copyright (C) 2001 Julian Elischer <julian@freebsd.org>. * All rights reserved. @@ -503,16 +504,13 @@ int discard, error; struct thread_mailbox *tmp; - printf("consider - "); /* * 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)) { - printf("CRITICAL - "); + (fuword(&tmp->tm_context.uc_flags) & UCF_CRITICAL)) return (0); - } /* * Save the thread's context, and link it @@ -525,10 +523,8 @@ * Failing to do the KSE operation just defaults * back to synchonous operation, so just return from * the syscall. - */{ - printf("error - "); + */ return (error); - } /* * Decide whether to perfom an upcall now. @@ -550,10 +546,9 @@ * What is OUR priority? The priority of the highest * sycall waiting to be returned? * For now, just let another KSE run (easiest). - */ { - printf("runq - "); + */ discard = 1; - } + /* Make sure the KSE's UTS context is free for use. */ if (fuword(&ke->ke_mailbox->km_context.uc_busy) != 0) /* @@ -561,9 +556,8 @@ * means the UTS is currently running, so switch to it * instead of performing another upcall (abandon this * thread). - */ { - printf("busy - "); - discard = 1; } + */ + discard = 1; /* Discard thread or mark for upcall. */ if (discard) { @@ -579,7 +573,6 @@ * the next upcall to any KSE in this KSEG. * */ - printf("discard\n"); PROC_LOCK(p); mtx_lock_spin(&sched_lock); thread_exit(); /* Abandon current thread. */ @@ -614,22 +607,17 @@ int error; ucontext_t uc; - printf("thread_userret - "); /* * Ensure that we have a spare thread available. */ - if (ke->ke_tdspare == NULL) { - printf("thread_alloc - "); + if (ke->ke_tdspare == NULL) ke->ke_tdspare = thread_alloc(); - } /* * Bound threads need no additional work. */ - if ((td->td_flags & TDF_UNBOUND) == 0) { - printf("bound\n"); + if ((td->td_flags & TDF_UNBOUND) == 0) return (0); - } error = 0; /* @@ -652,7 +640,6 @@ */ CTR3(KTR_PROC, "userret: upcall thread %p (pid %d, %s)", td, p->p_pid, p->p_comm); - printf("upcall - "); /* * Fetch the current UTS context from userland. @@ -697,7 +684,6 @@ * we are committing to go to user space as as this KSE here. */ td->td_flags &= ~TDF_UNBOUND; /* Bind to this user thread. */ - printf("binding\n"); return (error); } 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?200209010239.g812ddXj074973>