diff --git a/KernelLand/Kernel/include/posix_signals.h b/KernelLand/Kernel/include/posix_signals.h index b200634d14cb5134f5dda689c1a9338f1b055dc4..539ffcdfc2e460b904168203c7b2f4f49cd20aef 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 ca5275a127a6e491f69b998ff37bd91bc409971e..a4c8bd3f0127d472f33baf5442b6fd9d37e2d978 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 <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 index 0000000000000000000000000000000000000000..faf928f965bffa18fd3329461a94f05fa368214c --- /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 +