From eea4bca56be11a8eb51f4722a3d9d04627400ff5 Mon Sep 17 00:00:00 2001 From: Suleiman Souhlal Date: Fri, 24 Sep 2004 06:36:31 +0000 Subject: [PATCH] Make sure we don't call _thr_start_sig_daemon() when SYSTEM_SCOPE_ONLY is defined. This makes libpthread usable on powerpc. Approved by: grehan (mentor), deischen --- lib/libkse/thread/thr_kern.c | 5 +++-- lib/libpthread/thread/thr_kern.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index ac8bf5af2b2..417e4b841f0 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -439,6 +439,7 @@ _kse_setthreaded(int threaded) _kse_initial->k_kcb->kcb_kmbx.km_lwp; _thread_activated = 1; +#ifndef SYSTEM_SCOPE_ONLY if (_thread_scope_system <= 0) { /* Set current thread to initial thread */ _tcb_set(_kse_initial->k_kcb, _thr_initial->tcb); @@ -446,10 +447,10 @@ _kse_setthreaded(int threaded) _thr_start_sig_daemon(); _thr_setmaxconcurrency(); } - else { + else +#endif __sys_sigprocmask(SIG_SETMASK, &_thr_initial->sigmask, NULL); - } } return (0); } diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index ac8bf5af2b2..417e4b841f0 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -439,6 +439,7 @@ _kse_setthreaded(int threaded) _kse_initial->k_kcb->kcb_kmbx.km_lwp; _thread_activated = 1; +#ifndef SYSTEM_SCOPE_ONLY if (_thread_scope_system <= 0) { /* Set current thread to initial thread */ _tcb_set(_kse_initial->k_kcb, _thr_initial->tcb); @@ -446,10 +447,10 @@ _kse_setthreaded(int threaded) _thr_start_sig_daemon(); _thr_setmaxconcurrency(); } - else { + else +#endif __sys_sigprocmask(SIG_SETMASK, &_thr_initial->sigmask, NULL); - } } return (0); }