From: John Hodge Date: Sun, 5 Jan 2014 15:00:39 +0000 (+0800) Subject: Both - Merge signal lists X-Git-Tag: rel0.15~24 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=f829eb1731bb6e0b9f29d285603731cb36edaeb3;p=tpg%2Facess2.git Both - Merge signal lists --- diff --git a/KernelLand/Kernel/include/posix_signals.h b/KernelLand/Kernel/include/posix_signals.h index b200634d..539ffcdf 100644 --- a/KernelLand/Kernel/include/posix_signals.h +++ b/KernelLand/Kernel/include/posix_signals.h @@ -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); diff --git a/Usermode/Libraries/libc.so_src/include_exp/signal.h b/Usermode/Libraries/libc.so_src/include_exp/signal.h index ca5275a1..a4c8bd3f 100644 --- a/Usermode/Libraries/libc.so_src/include_exp/signal.h +++ b/Usermode/Libraries/libc.so_src/include_exp/signal.h @@ -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 // 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 index 00000000..faf928f9 --- /dev/null +++ b/Usermode/Libraries/libc.so_src/include_exp/signal_list.h @@ -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 +