URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [unix/] [sigset.c] - Rev 1773
Go to most recent revision | Compare with Previous | Blame | View Log
#include <signal.h> #include <errno.h> #ifdef SIG_SETMASK /* easier than trying to remove from Makefile */ #undef sigemptyset int sigemptyset (sigset_t * set) { *set = (sigset_t) 0; return 0; } int sigfillset (sigset_t * set) { *set = ~((sigset_t) 0); return 0; } #undef sigaddset int sigaddset (sigset_t * set, int signo) { if (signo >= NSIG || signo <= 0) { errno = EINVAL; return -1; } *set |= 1 << (signo - 1); return 0; } int sigdelset (sigset_t * set, int signo) { if (signo >= NSIG || signo <= 0) { errno = EINVAL; return -1; } *set &= ~(1 << (signo - 1)); return 0; } int sigismember (const sigset_t * set, int signo) { if (signo >= NSIG || signo <= 0) { errno = EINVAL; return -1; } if (*set & (1 << (signo - 1))) return 1; else return 0; } #endif /* SIG_SETMASK */
Go to most recent revision | Compare with Previous | Blame | View Log