diff options
| author | David Xu <davidxu@FreeBSD.org> | 2003-06-28 09:55:02 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2003-06-28 09:55:02 +0000 |
| commit | a772047bc659cf0fd4f41fb57895b1557ccb60c3 (patch) | |
| tree | 081cc14974dcb04e9a4a9f829846792004190d57 /lib/libpthread/thread/thr_sigpending.c | |
| parent | d15cbd7dc03101e0cc0608445c7c8d31b658e1d5 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sigpending.c')
| -rw-r--r-- | lib/libpthread/thread/thr_sigpending.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_sigpending.c b/lib/libpthread/thread/thr_sigpending.c index 7f42ff32b117..1b9b502c880c 100644 --- a/lib/libpthread/thread/thr_sigpending.c +++ b/lib/libpthread/thread/thr_sigpending.c @@ -54,8 +54,13 @@ _sigpending(sigset_t *set) ret = EINVAL; } else { - *set = curthread->sigpend; + if (!_kse_isthreaded()) + return __sys_sigpending(set); + crit = _kse_critical_enter(); + KSE_SCHED_LOCK(curthread->kse, curthread->kseg); + *set = curthread->sigpend; + KSE_SCHED_UNLOCK(curthread->kse, curthread->kseg); KSE_LOCK_ACQUIRE(curthread->kse, &_thread_signal_lock); SIGSETOR(*set, _thr_proc_sigpending); KSE_LOCK_RELEASE(curthread->kse, &_thread_signal_lock); |
