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