diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 23:56:12 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-28 23:56:12 +0000 |
| commit | 55613576f5c40d62fecb4ab76f012917fc399c3e (patch) | |
| tree | 90f4ce3660289c401aab5d0a2c4f105e5aa3e877 /lib/libpthread/thread/thr_sigsuspend.c | |
| parent | 6a9ccd81fefc8a10772034a7e4955fccdacc347f (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sigsuspend.c')
| -rw-r--r-- | lib/libpthread/thread/thr_sigsuspend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_sigsuspend.c b/lib/libpthread/thread/thr_sigsuspend.c index 7ce027a0099d..9ada1b2bb984 100644 --- a/lib/libpthread/thread/thr_sigsuspend.c +++ b/lib/libpthread/thread/thr_sigsuspend.c @@ -53,13 +53,14 @@ _sigsuspend(const sigset_t *set) memcpy(&curthread->tmbx.tm_context.uc_sigmask, set, sizeof(sigset_t)); + THR_LOCK_SWITCH(curthread); THR_SET_STATE(curthread, PS_SIGSUSPEND); - THR_SCHED_UNLOCK(curthread, curthread); - /* Wait for a signal: */ _thr_sched_switch(curthread); + THR_UNLOCK_SWITCH(curthread); + /* Always return an interrupted error: */ errno = EINTR; |
