source: trunk/minix/lib/ansi/sigmisc.c@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 796 bytes
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
16int _sigprocmask(int, sigset_t *, sigset_t *);
17
18static 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
27void
28__newsigset(sigset_t *p)
29{
30 /* The SIG_SETMASK is not significant */
31 _sigprocmask(SIG_SETMASK, NULL, p);
32}
33
34void
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.