1990-01-22 12:53:21 +00:00
|
|
|
/*
|
|
|
|
* sigmisc.c - used to get a signal mask
|
|
|
|
*/
|
1994-06-24 14:02:31 +00:00
|
|
|
/* $Id$ */
|
1990-01-22 12:53:21 +00:00
|
|
|
|
|
|
|
#if defined(_POSIX_SOURCE)
|
|
|
|
|
|
|
|
/* This can't be done in setjmp.e, since SIG_SETMASK is defined in
|
|
|
|
* <signal.h>. This is a C-file, which can't be included.
|
|
|
|
*/
|
|
|
|
|
1990-10-15 11:23:08 +00:00
|
|
|
#include <sys/types.h>
|
1990-01-22 12:53:21 +00:00
|
|
|
#include <signal.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
int _sigprocmask(int, sigset_t *, sigset_t *);
|
|
|
|
|
|
|
|
static void
|
|
|
|
__testsigset(void) {
|
|
|
|
/* This switch compiles when a sigset_t has the right size. */
|
|
|
|
switch(0) {
|
|
|
|
case 0:
|
|
|
|
case sizeof(sigset_t) <= sizeof(long): break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
__newsigset(sigset_t *p)
|
|
|
|
{
|
|
|
|
/* The SIG_SETMASK is not significant */
|
|
|
|
_sigprocmask(SIG_SETMASK, NULL, p);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
__oldsigset(sigset_t *p)
|
|
|
|
{
|
|
|
|
_sigprocmask(SIG_SETMASK, p, NULL);
|
|
|
|
}
|
|
|
|
#endif /* _POSIX_SOURCE */
|