Date: Sun, 8 Sep 2002 18:45:21 -0700 (PDT) From: Jonathan Mini <mini@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 17249 for review Message-ID: <200209090145.g891jLMJ059559@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17249 Change 17249 by mini@mini_stylus on 2002/09/08 18:44:25 Thread-safe formatted printing. Affected files ... .. //depot/projects/kse/lib/libc_r/uthread/uthread_printf.c#1 add .. //depot/projects/kse/sys/kern/kern_proc.c#83 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_proc.c#83 (text+ko) ==== @@ -293,6 +293,17 @@ int kse_yield(struct thread *td, struct kse_yield_args *uap) { + struct thread *td2; + + /* KSE-enabled processes only, please. */ + if ((td->td_proc->p_flag & P_KSES) == 0) + return (EINVAL); + + /* Don't discard the last thread. */ + td2 = FIRST_THREAD_IN_PROC(td->td_proc); + KASSERT(td2 != NULL, ("kse_yield: no threads in our proc")); + if (TAILQ_NEXT(td, td_plist) == NULL) + return (EINVAL); /* Abandon thread. */ PROC_LOCK(td->td_proc); 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?200209090145.g891jLMJ059559>