diff options
Diffstat (limited to 'src/signal/sigdelset.c')
| -rw-r--r-- | src/signal/sigdelset.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/signal/sigdelset.c b/src/signal/sigdelset.c index ca20cc43..bcd0d716 100644 --- a/src/signal/sigdelset.c +++ b/src/signal/sigdelset.c @@ -1,9 +1,14 @@ #include "sys/types.h" #include <signal.h> +#include "limits.h" int sigdelset(sigset_t * set, int signo) { - (void)set; (void)signo; + /* TODO: fail with EINVAL if signo is not a valid signal number */ + size_t byte = signo % CHAR_BIT; + int bit = signo / CHAR_BIT; + + set->__bits[byte] ^= (1 << bit); return 0; } /* |
