c815c4f7cdf694332c77ba849cc5bc79facc5afa
[lunaix-os.git] / lunaix-os / includes / lunaix / signal.h
1 #ifndef __LUNAIX_SIGNAL_H
2 #define __LUNAIX_SIGNAL_H
3
4 #include <signal_defs.h>
5
6 #define _SIG_NUM 16
7
8 #define _SIG_PENDING(bitmap, sig) ((bitmap) & (1 << (sig)))
9
10 #define _SIGSEGV SIGSEGV
11 #define _SIGALRM SIGALRM
12 #define _SIGCHLD SIGCHLD
13 #define _SIGCLD SIGCLD
14 #define _SIGINT SIGINT
15 #define _SIGKILL SIGKILL
16 #define _SIGSTOP SIGSTOP
17 #define _SIGCONT SIGCONT
18 #define _SIGTERM SIGTERM
19
20 #define __SIGNAL(num) (1 << (num))
21 #define __SIGSET(bitmap, num) (bitmap = bitmap | __SIGNAL(num))
22 #define __SIGTEST(bitmap, num) (bitmap & __SIGNAL(num))
23 #define __SIGCLEAR(bitmap, num) ((bitmap) = (bitmap) & ~__SIGNAL(num))
24
25 #define _SIGNAL_UNMASKABLE (__SIGNAL(_SIGKILL) | __SIGNAL(_SIGSTOP))
26
27 #define _SIG_BLOCK SIG_BLOCK
28 #define _SIG_UNBLOCK SIG_UNBLOCK
29 #define _SIG_SETMASK SIG_SETMASK
30
31 #endif /* __LUNAIX_SIGNAL_H */