Line | |
---|
1 | /*
|
---|
2 | * sigmisc.c - used to get a signal mask
|
---|
3 | */
|
---|
4 | /* $Header: /cvsup/minix/src/lib/ansi/sigmisc.c,v 1.1.1.1 2005/04/21 14:56:06 beng Exp $ */
|
---|
5 |
|
---|
6 | #if defined(_POSIX_SOURCE)
|
---|
7 |
|
---|
8 | /* This can't be done in setjmp.e, since SIG_SETMASK is defined in
|
---|
9 | * <signal.h>. This is a C-file, which can't be included.
|
---|
10 | */
|
---|
11 |
|
---|
12 | #include <sys/types.h>
|
---|
13 | #include <signal.h>
|
---|
14 | #include <stddef.h>
|
---|
15 |
|
---|
16 | int _sigprocmask(int, sigset_t *, sigset_t *);
|
---|
17 |
|
---|
18 | static void
|
---|
19 | __testsigset(void) {
|
---|
20 | /* This switch compiles when a sigset_t has the right size. */
|
---|
21 | switch(0) {
|
---|
22 | case 0:
|
---|
23 | case sizeof(sigset_t) <= sizeof(long): break;
|
---|
24 | }
|
---|
25 | }
|
---|
26 |
|
---|
27 | void
|
---|
28 | __newsigset(sigset_t *p)
|
---|
29 | {
|
---|
30 | /* The SIG_SETMASK is not significant */
|
---|
31 | _sigprocmask(SIG_SETMASK, NULL, p);
|
---|
32 | }
|
---|
33 |
|
---|
34 | void
|
---|
35 | __oldsigset(sigset_t *p)
|
---|
36 | {
|
---|
37 | _sigprocmask(SIG_SETMASK, p, NULL);
|
---|
38 | }
|
---|
39 | #endif /* _POSIX_SOURCE */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.