summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-07-30 21:09:14 -0400
committerRich Felker <dalias@aerifal.cx>2011-07-30 21:09:14 -0400
commitad5881842eaa6a04fcb35b822b0a046a3f7e73a2 (patch)
tree1d0ac5c3fe5d44da05a805dd6cf0c6db0c9c115c /src/thread
parent544ee752cd38febfa3aa3798b4dfb6fabd13846b (diff)
downloadmusl-ad5881842eaa6a04fcb35b822b0a046a3f7e73a2.tar.gz
clean up pthread_sigmask/sigprocmask dependency order
it's nicer for the function that doesn't use errno to be independent, and have the other one call it. saves some time and avoids clobbering errno.
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/pthread_sigmask.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/thread/pthread_sigmask.c b/src/thread/pthread_sigmask.c
index 6cc21d22..60a440b4 100644
--- a/src/thread/pthread_sigmask.c
+++ b/src/thread/pthread_sigmask.c
@@ -1,10 +1,10 @@
#include <signal.h>
#include <errno.h>
#include <pthread.h>
+#include "syscall.h"
int pthread_sigmask(int how, const sigset_t *set, sigset_t *old)
{
- int ret = sigprocmask(how, set, old);
- if (ret) return errno;
- return 0;
+ if (how > 2U) return EINVAL;
+ return -__syscall(SYS_rt_sigprocmask, how, set, old, 8);
}