summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/signal/sigprocmask.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/signal/sigprocmask.c')
-rw-r--r--libc-top-half/musl/src/signal/sigprocmask.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/sigprocmask.c b/libc-top-half/musl/src/signal/sigprocmask.c
new file mode 100644
index 0000000..297e20c
--- /dev/null
+++ b/libc-top-half/musl/src/signal/sigprocmask.c
@@ -0,0 +1,10 @@
+#include <signal.h>
+#include <errno.h>
+
+int sigprocmask(int how, const sigset_t *restrict set, sigset_t *restrict old)
+{
+ int r = pthread_sigmask(how, set, old);
+ if (!r) return r;
+ errno = r;
+ return -1;
+}