diff options
Diffstat (limited to '')
-rw-r--r-- | libc-top-half/musl/src/signal/sigdelset.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/sigdelset.c b/libc-top-half/musl/src/signal/sigdelset.c new file mode 100644 index 0000000..ce69280 --- /dev/null +++ b/libc-top-half/musl/src/signal/sigdelset.c @@ -0,0 +1,13 @@ +#include <signal.h> +#include <errno.h> + +int sigdelset(sigset_t *set, int sig) +{ + unsigned s = sig-1; + if (s >= _NSIG-1 || sig-32U < 3) { + errno = EINVAL; + return -1; + } + set->__bits[s/8/sizeof *set->__bits] &=~(1UL<<(s&8*sizeof *set->__bits-1)); + return 0; +} |