summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_sigsuspend.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2003-07-17 23:02:30 +0000
committerDavid Xu <davidxu@FreeBSD.org>2003-07-17 23:02:30 +0000
commit090b336154a0d8570ea8fad84e60e7d49aa801e7 (patch)
tree501dc66c4a1aec9b0ce29190b9613a1163a1f18a /lib/libpthread/thread/thr_sigsuspend.c
parent3074d1b454e37e25facad76e56d2a05317f9e751 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sigsuspend.c')
-rw-r--r--lib/libpthread/thread/thr_sigsuspend.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_sigsuspend.c b/lib/libpthread/thread/thr_sigsuspend.c
index 869e3d919bab..e3402a468a6e 100644
--- a/lib/libpthread/thread/thr_sigsuspend.c
+++ b/lib/libpthread/thread/thr_sigsuspend.c
@@ -35,6 +35,7 @@
#include <errno.h>
#include <pthread.h>
#include <string.h>
+#include <sys/signalvar.h>
#include "thr_private.h"
__weak_reference(__sigsuspend, sigsuspend);
@@ -46,12 +47,14 @@ _sigsuspend(const sigset_t *set)
sigset_t oldmask, newmask;
int ret = -1;
- if (!_kse_isthreaded())
- return __sys_sigsuspend(set);
+ if (!_kse_isthreaded() ||
+ (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM))
+ return (__sys_sigsuspend(set));
/* Check if a new signal set was provided by the caller: */
if (set != NULL) {
newmask = *set;
+ SIG_CANTMASK(newmask);
THR_LOCK_SWITCH(curthread);