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' of github.com:Minep/lunaix-os
[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 4a4cf0b725234ba2f65ad2fc3276f3fecc1a4041..d1f7041ebd284257b8ce8730f3c155a6d56d426e 100644
(file)
--- a/
lunaix-os/includes/lunaix/signal.h
+++ b/
lunaix-os/includes/lunaix/signal.h
@@
-1,6
+1,8
@@
#ifndef __LUNAIX_SIGNAL_H
#define __LUNAIX_SIGNAL_H
#ifndef __LUNAIX_SIGNAL_H
#define __LUNAIX_SIGNAL_H
+#include <lunaix/syscall.h>
+
#define _SIG_NUM 8
#define _SIG_PENDING(bitmap, sig) ((bitmap) & (1 << (sig)))
#define _SIG_NUM 8
#define _SIG_PENDING(bitmap, sig) ((bitmap) & (1 << (sig)))
@@
-8,13
+10,16
@@
#define _SIGSEGV 0
#define _SIGALRM 1
#define _SIGCHLD 2
#define _SIGSEGV 0
#define _SIGALRM 1
#define _SIGCHLD 2
-#define _SIGCLD SIGCHLD
+#define _SIGCLD
_
SIGCHLD
#define _SIGINT 3
#define _SIGKILL 4
#define _SIGSTOP 5
#define _SIGCONT 6
#define _SIGINT 3
#define _SIGKILL 4
#define _SIGSTOP 5
#define _SIGCONT 6
-#define _SIGNAL_UNMASKABLE ((1 << _SIGKILL) | (1 << _SIGSTOP))
+#define __SIGNAL(num) (1 << (num))
+#define __SET_SIGNAL(bitmap, num) (bitmap = bitmap | __SIGNAL(num))
+
+#define _SIGNAL_UNMASKABLE (__SIGNAL(_SIGKILL) | __SIGNAL(_SIGSTOP))
#define _SIG_BLOCK 1
#define _SIG_UNBLOCK 2
#define _SIG_BLOCK 1
#define _SIG_UNBLOCK 2
@@
-23,4
+28,6
@@
typedef unsigned int sigset_t;
typedef void (*sighandler_t)(int);
typedef unsigned int sigset_t;
typedef void (*sighandler_t)(int);
+__LXSYSCALL2(int, signal, int, signum, sighandler_t, handler);
+
#endif /* __LUNAIX_SIGNAL_H */
#endif /* __LUNAIX_SIGNAL_H */