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 6144 |
| 6 #define SIGSTKSZ 12288 |
| 7 #endif |
| 8 |
| 9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 10 typedef unsigned long greg_t; |
| 11 typedef unsigned long gregset_t[34]; |
| 12 |
| 13 typedef struct { |
| 14 long double vregs[32]; |
| 15 unsigned int fpsr; |
| 16 unsigned int fpcr; |
| 17 } fpregset_t; |
| 18 typedef struct sigcontext |
| 19 { |
| 20 unsigned long fault_address; |
| 21 unsigned long regs[31]; |
| 22 unsigned long sp, pc, pstate; |
| 23 long double __reserved[256]; |
| 24 } mcontext_t; |
| 25 |
| 26 #define FPSIMD_MAGIC 0x46508001 |
| 27 #define ESR_MAGIC 0x45535201 |
| 28 struct _aarch64_ctx { |
| 29 unsigned int magic; |
| 30 unsigned int size; |
| 31 }; |
| 32 struct fpsimd_context { |
| 33 struct _aarch64_ctx head; |
| 34 unsigned int fpsr; |
| 35 unsigned int fpcr; |
| 36 long double vregs[32]; |
| 37 }; |
| 38 struct esr_context { |
| 39 struct _aarch64_ctx head; |
| 40 unsigned long esr; |
| 41 }; |
| 42 #else |
| 43 typedef struct { |
| 44 long double __regs[18+256]; |
| 45 } mcontext_t; |
| 46 #endif |
| 47 |
| 48 struct sigaltstack { |
| 49 void *ss_sp; |
| 50 int ss_flags; |
| 51 size_t ss_size; |
| 52 }; |
| 53 |
| 54 typedef struct __ucontext { |
| 55 unsigned long uc_flags; |
| 56 struct ucontext *uc_link; |
| 57 stack_t uc_stack; |
| 58 sigset_t uc_sigmask; |
| 59 mcontext_t uc_mcontext; |
| 60 } ucontext_t; |
| 61 |
| 62 #define SA_NOCLDSTOP 1 |
| 63 #define SA_NOCLDWAIT 2 |
| 64 #define SA_SIGINFO 4 |
| 65 #define SA_ONSTACK 0x08000000 |
| 66 #define SA_RESTART 0x10000000 |
| 67 #define SA_NODEFER 0x40000000 |
| 68 #define SA_RESETHAND 0x80000000 |
| 69 #define SA_RESTORER 0x04000000 |
| 70 |
| 71 #endif |
| 72 |
| 73 #define SIGHUP 1 |
| 74 #define SIGINT 2 |
| 75 #define SIGQUIT 3 |
| 76 #define SIGILL 4 |
| 77 #define SIGTRAP 5 |
| 78 #define SIGABRT 6 |
| 79 #define SIGIOT SIGABRT |
| 80 #define SIGBUS 7 |
| 81 #define SIGFPE 8 |
| 82 #define SIGKILL 9 |
| 83 #define SIGUSR1 10 |
| 84 #define SIGSEGV 11 |
| 85 #define SIGUSR2 12 |
| 86 #define SIGPIPE 13 |
| 87 #define SIGALRM 14 |
| 88 #define SIGTERM 15 |
| 89 #define SIGSTKFLT 16 |
| 90 #define SIGCHLD 17 |
| 91 #define SIGCONT 18 |
| 92 #define SIGSTOP 19 |
| 93 #define SIGTSTP 20 |
| 94 #define SIGTTIN 21 |
| 95 #define SIGTTOU 22 |
| 96 #define SIGURG 23 |
| 97 #define SIGXCPU 24 |
| 98 #define SIGXFSZ 25 |
| 99 #define SIGVTALRM 26 |
| 100 #define SIGPROF 27 |
| 101 #define SIGWINCH 28 |
| 102 #define SIGIO 29 |
| 103 #define SIGPOLL 29 |
| 104 #define SIGPWR 30 |
| 105 #define SIGSYS 31 |
| 106 #define SIGUNUSED SIGSYS |
| 107 |
| 108 #define _NSIG 65 |
OLD | NEW |