| OLD | NEW |
| (Empty) |
| 1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \ | |
| 2 defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | |
| 3 | |
| 4 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | |
| 5 #define MINSIGSTKSZ 4096 | |
| 6 #define SIGSTKSZ 10240 | |
| 7 #endif | |
| 8 | |
| 9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | |
| 10 | |
| 11 typedef unsigned long greg_t, gregset_t[48]; | |
| 12 | |
| 13 typedef struct { | |
| 14 double fpregs[32]; | |
| 15 double fpscr; | |
| 16 unsigned _pad[2]; | |
| 17 } fpregset_t; | |
| 18 | |
| 19 typedef struct { | |
| 20 unsigned vrregs[32][4]; | |
| 21 unsigned vrsave; | |
| 22 unsigned _pad[2]; | |
| 23 unsigned vscr; | |
| 24 } vrregset_t; | |
| 25 | |
| 26 struct sigcontext { | |
| 27 unsigned long _unused[4]; | |
| 28 int signal; | |
| 29 unsigned long handler; | |
| 30 unsigned long oldmask; | |
| 31 void* regs; | |
| 32 }; | |
| 33 | |
| 34 typedef struct { | |
| 35 gregset_t gregs; | |
| 36 fpregset_t fpregs; | |
| 37 vrregset_t vrregs | |
| 38 #ifdef __GNUC__ | |
| 39 __attribute__((__aligned__(16))) | |
| 40 #endif | |
| 41 ; | |
| 42 } mcontext_t; | |
| 43 | |
| 44 #else | |
| 45 | |
| 46 typedef struct { | |
| 47 long __regs[48 + 68 + 4 * 32 + 4] | |
| 48 #ifdef __GNUC__ | |
| 49 __attribute__((__aligned__(16))) | |
| 50 #endif | |
| 51 ; | |
| 52 } mcontext_t; | |
| 53 | |
| 54 #endif | |
| 55 | |
| 56 struct sigaltstack { | |
| 57 void* ss_sp; | |
| 58 int ss_flags; | |
| 59 size_t ss_size; | |
| 60 }; | |
| 61 | |
| 62 typedef struct __ucontext { | |
| 63 unsigned long uc_flags; | |
| 64 struct __ucontext* uc_link; | |
| 65 stack_t uc_stack; | |
| 66 int uc_pad[7]; | |
| 67 mcontext_t* uc_regs; | |
| 68 sigset_t uc_sigmask; | |
| 69 int uc_pad2[3]; | |
| 70 mcontext_t uc_mcontext; | |
| 71 } ucontext_t; | |
| 72 | |
| 73 #define SA_NOCLDSTOP 1U | |
| 74 #define SA_NOCLDWAIT 2U | |
| 75 #define SA_SIGINFO 4U | |
| 76 #define SA_ONSTACK 0x08000000U | |
| 77 #define SA_RESTART 0x10000000U | |
| 78 #define SA_NODEFER 0x40000000U | |
| 79 #define SA_RESETHAND 0x80000000U | |
| 80 #define SA_RESTORER 0x04000000U | |
| 81 | |
| 82 #endif | |
| 83 | |
| 84 #define SIGHUP 1 | |
| 85 #define SIGINT 2 | |
| 86 #define SIGQUIT 3 | |
| 87 #define SIGILL 4 | |
| 88 #define SIGTRAP 5 | |
| 89 #define SIGABRT 6 | |
| 90 #define SIGIOT SIGABRT | |
| 91 #define SIGBUS 7 | |
| 92 #define SIGFPE 8 | |
| 93 #define SIGKILL 9 | |
| 94 #define SIGUSR1 10 | |
| 95 #define SIGSEGV 11 | |
| 96 #define SIGUSR2 12 | |
| 97 #define SIGPIPE 13 | |
| 98 #define SIGALRM 14 | |
| 99 #define SIGTERM 15 | |
| 100 #define SIGSTKFLT 16 | |
| 101 #define SIGCHLD 17 | |
| 102 #define SIGCONT 18 | |
| 103 #define SIGSTOP 19 | |
| 104 #define SIGTSTP 20 | |
| 105 #define SIGTTIN 21 | |
| 106 #define SIGTTOU 22 | |
| 107 #define SIGURG 23 | |
| 108 #define SIGXCPU 24 | |
| 109 #define SIGXFSZ 25 | |
| 110 #define SIGVTALRM 26 | |
| 111 #define SIGPROF 27 | |
| 112 #define SIGWINCH 28 | |
| 113 #define SIGIO 29 | |
| 114 #define SIGPOLL 29 | |
| 115 #define SIGPWR 30 | |
| 116 #define SIGSYS 31 | |
| 117 #define SIGUNUSED SIGSYS | |
| 118 | |
| 119 #define _NSIG 65 | |
| OLD | NEW |