summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_sigsuspend.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_sigsuspend.c')
-rw-r--r--lib/libc_r/uthread/uthread_sigsuspend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc_r/uthread/uthread_sigsuspend.c b/lib/libc_r/uthread/uthread_sigsuspend.c
index f7a7b12..0ae9a4f 100644
--- a/lib/libc_r/uthread/uthread_sigsuspend.c
+++ b/lib/libc_r/uthread/uthread_sigsuspend.c
@@ -44,14 +44,14 @@ sigsuspend(const sigset_t * set)
/* Check if a new signal set was provided by the caller: */
if (set != NULL) {
- /* Save the current sigmal mask: */
+ /* Save the current signal mask: */
oset = _thread_run->sigmask;
- /* Combine the caller's mask with the current one: */
- _thread_run->sigmask |= *set;
+ /* Change the caller's mask: */
+ _thread_run->sigmask = *set;
/* Wait for a signal: */
- _thread_kern_sched_state(PS_SIGWAIT, __FILE__, __LINE__);
+ _thread_kern_sched_state(PS_SIGSUSPEND, __FILE__, __LINE__);
/* Always return an interrupted error: */
errno = EINTR;
OpenPOWER on IntegriCloud