diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-09-16 02:03:39 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-09-16 02:03:39 +0000 |
commit | e7f6efc66e40dadef29371932d24cc99b093e8e5 (patch) | |
tree | 6d1f032e554fb8b8a60bf78a4b056ec99479a6a5 /lib/libkse/thread | |
parent | 7332e364d06ab7e85340b2c6effe977856ab1815 (diff) | |
download | FreeBSD-src-e7f6efc66e40dadef29371932d24cc99b093e8e5.zip FreeBSD-src-e7f6efc66e40dadef29371932d24cc99b093e8e5.tar.gz |
Fix a typo. Also turn on PTHREAD_SCOPE_SYSTEM after fork().
Diffstat (limited to 'lib/libkse/thread')
-rw-r--r-- | lib/libkse/thread/thr_kern.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index e3539ab..4c78265 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -330,6 +330,7 @@ _kse_single_thread(struct pthread *curthread) */ sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); curthread->kse->k_kcb->kcb_kmbx.km_curthread = NULL; + curthread->attr.flags |= PTHREAD_SCOPE_SYSTEM; _thr_active_threads = 1; #endif } @@ -1642,7 +1643,7 @@ kse_switchout_thread(struct kse *kse, struct pthread *thread) for (i = 1; i <= _SIG_MAXSIG; ++i) { if (SIGISMEMBER(thread->sigpend, i) && !SIGISMEMBER(thread->sigmask, i)) { - restart = _thread_sigact[1 - 1].sa_flags & SA_RESTART; + restart = _thread_sigact[i - 1].sa_flags & SA_RESTART; kse_thr_interrupt(&thread->tcb->tcb_tmbx, restart ? KSE_INTR_RESTART : KSE_INTR_INTERRUPT, 0); break; |