summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/signal/sigisemptyset.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/signal/sigisemptyset.c')
-rw-r--r--libc-top-half/musl/src/signal/sigisemptyset.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/sigisemptyset.c b/libc-top-half/musl/src/signal/sigisemptyset.c
new file mode 100644
index 0000000..68b8662
--- /dev/null
+++ b/libc-top-half/musl/src/signal/sigisemptyset.c
@@ -0,0 +1,10 @@
+#define _GNU_SOURCE
+#include <signal.h>
+#include <string.h>
+
+int sigisemptyset(const sigset_t *set)
+{
+ for (size_t i=0; i<_NSIG/8/sizeof *set->__bits; i++)
+ if (set->__bits[i]) return 0;
+ return 1;
+}