diff options
author | David Xu <davidxu@FreeBSD.org> | 2003-08-18 03:58:29 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2003-08-18 03:58:29 +0000 |
commit | e81bbed597a0ea8392ded3f1161aa98151c496a5 (patch) | |
tree | e6cd1320cfc169c79d0f276a0d69df8a3e83fcd4 /lib/libpthread/thread/thr_sigprocmask.c | |
parent | da245931e384a52716fc700994e302807a7593e8 (diff) | |
download | src-e81bbed597a0ea8392ded3f1161aa98151c496a5.tar.gz src-e81bbed597a0ea8392ded3f1161aa98151c496a5.zip |
Treat initial thread as scope system thread when KSE mode is not activated
yet, so we can protect some locking code from being interrupted by signal
handling. When KSE mode is turned on, reset the thread flag to scope process
except we are running in 1:1 mode which we needn't turn it off.
Also remove some unused member variables in structure kse.
Tested by: deischen
Notes
Notes:
svn path=/head/; revision=119063
Diffstat (limited to 'lib/libpthread/thread/thr_sigprocmask.c')
-rw-r--r-- | lib/libpthread/thread/thr_sigprocmask.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libpthread/thread/thr_sigprocmask.c b/lib/libpthread/thread/thr_sigprocmask.c index 262848a810ee..d87df58e60c0 100644 --- a/lib/libpthread/thread/thr_sigprocmask.c +++ b/lib/libpthread/thread/thr_sigprocmask.c @@ -46,9 +46,10 @@ _sigprocmask(int how, const sigset_t *set, sigset_t *oset) { int ret; - if (_kse_isthreaded() == 0) - ret = __sys_sigprocmask(how, set, oset); - else - ret = pthread_sigmask(how, set, oset); + ret = pthread_sigmask(how, set, oset); + if (ret) { + errno = ret; + ret = -1; + } return (ret); } |