[49] in Pthreads mailing list archive
pthread_sig_process: kernel lock?
daemon@ATHENA.MIT.EDU (Steven Hugg)
Tue Jul 25 15:41:33 1995
From: Steven Hugg <hugg@xi.cs.fsu.edu>
To: pthreads@MIT.EDU
Date: Tue, 25 Jul 1995 15:10:03 -0400 (EDT)
Something is bothering me. Consider this piece of code from
pthread_sched_resume:
: /* Only bother if we are truely unlocking the kernel */
: while (!(--pthread_kernel_lock)) {
: if (SIG_ANY(sig_to_process)) {
: pthread_kernel_lock++;
: sig_handler(0);
: } else {
: if (pthread_run && pthread_run->sigcount) {
: pthread_sig_process();
^^^^^^^^^^^^^^^^^^^^^^
: }
: break;
: }
: }
So it's definite that pthread_kernel_lock == 0 when pthread_sig_process()
is called, right? But pthread_sig_process() says:
/*==========================================================================
* pthread_sig_process()
*
* Assumes the kernel is locked.
*/
And PANIC()s when it is called with a non-default signal. Am I missing
something?
--
Steven E. Hugg
hugg@cs.fsu.edu