1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Fix a typo. Also turn on PTHREAD_SCOPE_SYSTEM after fork().

This commit is contained in:
David Xu 2003-09-16 02:03:39 +00:00
parent a87a12715c
commit 0f5297f5c3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120109
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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;