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
This commit is contained in:
Suleiman Souhlal 2004-09-24 06:36:31 +00:00
parent 48c8620ae4
commit eea4bca56b
2 changed files with 6 additions and 4 deletions

View File

@ -439,6 +439,7 @@ _kse_setthreaded(int threaded)
_kse_initial->k_kcb->kcb_kmbx.km_lwp; _kse_initial->k_kcb->kcb_kmbx.km_lwp;
_thread_activated = 1; _thread_activated = 1;
#ifndef SYSTEM_SCOPE_ONLY
if (_thread_scope_system <= 0) { if (_thread_scope_system <= 0) {
/* Set current thread to initial thread */ /* Set current thread to initial thread */
_tcb_set(_kse_initial->k_kcb, _thr_initial->tcb); _tcb_set(_kse_initial->k_kcb, _thr_initial->tcb);
@ -446,10 +447,10 @@ _kse_setthreaded(int threaded)
_thr_start_sig_daemon(); _thr_start_sig_daemon();
_thr_setmaxconcurrency(); _thr_setmaxconcurrency();
} }
else { else
#endif
__sys_sigprocmask(SIG_SETMASK, &_thr_initial->sigmask, __sys_sigprocmask(SIG_SETMASK, &_thr_initial->sigmask,
NULL); NULL);
}
} }
return (0); return (0);
} }

View File

@ -439,6 +439,7 @@ _kse_setthreaded(int threaded)
_kse_initial->k_kcb->kcb_kmbx.km_lwp; _kse_initial->k_kcb->kcb_kmbx.km_lwp;
_thread_activated = 1; _thread_activated = 1;
#ifndef SYSTEM_SCOPE_ONLY
if (_thread_scope_system <= 0) { if (_thread_scope_system <= 0) {
/* Set current thread to initial thread */ /* Set current thread to initial thread */
_tcb_set(_kse_initial->k_kcb, _thr_initial->tcb); _tcb_set(_kse_initial->k_kcb, _thr_initial->tcb);
@ -446,10 +447,10 @@ _kse_setthreaded(int threaded)
_thr_start_sig_daemon(); _thr_start_sig_daemon();
_thr_setmaxconcurrency(); _thr_setmaxconcurrency();
} }
else { else
#endif
__sys_sigprocmask(SIG_SETMASK, &_thr_initial->sigmask, __sys_sigprocmask(SIG_SETMASK, &_thr_initial->sigmask,
NULL); NULL);
}
} }
return (0); return (0);
} }