Both - Merge signal lists
authorJohn Hodge <[email protected]>
Sun, 5 Jan 2014 15:00:39 +0000 (23:00 +0800)
committerJohn Hodge <[email protected]>
Sun, 5 Jan 2014 15:00:39 +0000 (23:00 +0800)
KernelLand/Kernel/include/posix_signals.h
Usermode/Libraries/libc.so_src/include_exp/signal.h
Usermode/Libraries/libc.so_src/include_exp/signal_list.h [new file with mode: 0644]

index b200634..539ffcd 100644 (file)
@@ -7,29 +7,7 @@
 
 #define SIG_DFL        NULL
 
-enum eSignals {
-       SIGNONE =  0,   // No signal
-       SIGHUP  =  1,
-       SIGINT  =  2,   // C
-       SIGQUIT =  3,   // POSIX
-       SIGILL  =  4,   // C
-       SIGTRAP =  5,   // POSIX
-       SIGABRT =  6,   // C?
-       SIGBUS  =  7,   // ?
-       SIGFPE  =  8,   // C
-       SIGKILL =  9,   // POSIX
-       SIGUSR1 = 10,
-       SIGSEGV = 11,   // C
-       SIGUSR2 = 12,
-       SIGPIPE = 13,   // 
-       SIGALRM = 14,
-       SIGTERM = 15,   
-       _SIG16  = 16,
-       SIGCHLD = 17,
-       SIGCONT = 18,
-       SIGSTOP = 19,
-       NSIGNALS
-};
+#include "../../../Usermode/Libraries/libc.so_src/include_exp/signal_list.h"
 
 extern void    Threads_PostSignal(int SigNum);
 extern void    Threads_SignalGroup(tPGID PGID, int SignalNum);
index ca5275a..a4c8bd3 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef _SIGNAL_H_
 #define _SIGNAL_H_
 
+#include "signal_list.h"
+
 typedef void (*sighandler_t)(int);
 
 //! Atomic integer type
@@ -17,33 +19,10 @@ typedef volatile int        sig_atomic_t;
 #define SIG_DFL        ((void*)0)
 #define SIG_ERR        ((void*)-1)
 
-#define SIGINT 2       // C99
-#define SIGILL 4       // C99
-#define        SIGABRT 6       // C99
-#define SIGFPE 8       // C99
-#define SIGSEGV        11      // C99
-#define SIGTERM        15      // C99
-
 extern sighandler_t    signal(int signum, sighandler_t handler);
 
 extern int     raise(int sig);
 
-// POSIX Signals
-#define SIGHUP 1
-#define SIGQUIT        3
-#define SIGKILL        9
-#define SIGALRM        14
-#define SIGUSR1        16
-#define SIGUSR2        17
-
-#define SIGSTOP        30      // Stop process
-#define SIGTSTP        31      // ? ^Z
-#define SIGTTIN        32      // Background process read TTY
-#define SIGTTOU        33      // Background process write TTY
-#define SIGPIPE        34
-#define SIGCHLD        35
-#define SIGWINCH       36
-
 #include <sys/types.h> // libposix
 
 typedef long long unsigned int sigset_t;
diff --git a/Usermode/Libraries/libc.so_src/include_exp/signal_list.h b/Usermode/Libraries/libc.so_src/include_exp/signal_list.h
new file mode 100644 (file)
index 0000000..faf928f
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef _ACESSLIBC__SIGNAL_LIST_H_
+#define _ACESSLIBC__SIGNAL_LIST_H_
+
+enum {
+       SIGNONE,
+       SIGHUP,         // POSIX
+       SIGINT,         // C99
+       SIGQUIT,        // POSIX
+       SIGILL,         // C99
+       _SIGNAL_5,
+       SIGABRT,        // C99
+       _SIGNAL_7,
+       SIGFPE,         // C99
+       SIGKILL,        // POSIX
+       _SIGNAL_10,
+       SIGSEGV,        // C99
+       SIGALRM,        // POSIX
+       SIGTERM,        // C99
+       SIGUSR1,        // POSIX
+       SIGUSR2,        // POSIX
+
+       // = 16
+       SIGSTOP,        // POSIX - Stop process
+       SIGTSTP,        // POSIX - ? ^Z
+       SIGTTIN,        // POSIX - Background process read TTY
+       SIGTTOU,        // POSIX - Background process write TTY
+       SIGPIPE,        // POSIX
+       SIGCHLD,        // POSIX
+       SIGWINCH,       // POSIX
+
+       NSIGNALS
+};
+
+#endif
+

UCC git Repository :: git.ucc.asn.au