git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into prog-loader
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
signal.h
diff --git
a/lunaix-os/includes/lunaix/signal.h
b/lunaix-os/includes/lunaix/signal.h
index d1f7041ebd284257b8ce8730f3c155a6d56d426e..c815c4f7cdf694332c77ba849cc5bc79facc5afa 100644
(file)
--- a/
lunaix-os/includes/lunaix/signal.h
+++ b/
lunaix-os/includes/lunaix/signal.h
@@
-1,33
+1,31
@@
#ifndef __LUNAIX_SIGNAL_H
#define __LUNAIX_SIGNAL_H
#ifndef __LUNAIX_SIGNAL_H
#define __LUNAIX_SIGNAL_H
-#include <
lunaix/syscall
.h>
+#include <
signal_defs
.h>
-#define _SIG_NUM
8
+#define _SIG_NUM
16
#define _SIG_PENDING(bitmap, sig) ((bitmap) & (1 << (sig)))
#define _SIG_PENDING(bitmap, sig) ((bitmap) & (1 << (sig)))
-#define _SIGSEGV 0
-#define _SIGALRM 1
-#define _SIGCHLD 2
-#define _SIGCLD _SIGCHLD
-#define _SIGINT 3
-#define _SIGKILL 4
-#define _SIGSTOP 5
-#define _SIGCONT 6
+#define _SIGSEGV SIGSEGV
+#define _SIGALRM SIGALRM
+#define _SIGCHLD SIGCHLD
+#define _SIGCLD SIGCLD
+#define _SIGINT SIGINT
+#define _SIGKILL SIGKILL
+#define _SIGSTOP SIGSTOP
+#define _SIGCONT SIGCONT
+#define _SIGTERM SIGTERM
#define __SIGNAL(num) (1 << (num))
#define __SIGNAL(num) (1 << (num))
-#define __SET_SIGNAL(bitmap, num) (bitmap = bitmap | __SIGNAL(num))
+#define __SIGSET(bitmap, num) (bitmap = bitmap | __SIGNAL(num))
+#define __SIGTEST(bitmap, num) (bitmap & __SIGNAL(num))
+#define __SIGCLEAR(bitmap, num) ((bitmap) = (bitmap) & ~__SIGNAL(num))
#define _SIGNAL_UNMASKABLE (__SIGNAL(_SIGKILL) | __SIGNAL(_SIGSTOP))
#define _SIGNAL_UNMASKABLE (__SIGNAL(_SIGKILL) | __SIGNAL(_SIGSTOP))
-#define _SIG_BLOCK 1
-#define _SIG_UNBLOCK 2
-#define _SIG_SETMASK 3
-
-typedef unsigned int sigset_t;
-typedef void (*sighandler_t)(int);
-
-__LXSYSCALL2(int, signal, int, signum, sighandler_t, handler);
+#define _SIG_BLOCK SIG_BLOCK
+#define _SIG_UNBLOCK SIG_UNBLOCK
+#define _SIG_SETMASK SIG_SETMASK
#endif /* __LUNAIX_SIGNAL_H */
#endif /* __LUNAIX_SIGNAL_H */