| 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 2048 |
| 6 |
#define SIGSTKSZ 8192 |
| 7 |
#endif |
| 8 |
|
| 9 |
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 10 |
typedef int greg_t, gregset_t[18]; |
| 11 |
typedef struct sigcontext { |
| 12 |
unsigned long trap_no, error_code, oldmask; |
| 13 |
unsigned long arm_r0, arm_r1, arm_r2, arm_r3; |
| 14 |
unsigned long arm_r4, arm_r5, arm_r6, arm_r7; |
| 15 |
unsigned long arm_r8, arm_r9, arm_r10, arm_fp; |
| 16 |
unsigned long arm_ip, arm_sp, arm_lr, arm_pc; |
| 17 |
unsigned long arm_cpsr, fault_address; |
| 18 |
} mcontext_t; |
| 19 |
#else |
| 20 |
typedef struct { |
| 21 |
unsigned long __regs[21]; |
| 22 |
} mcontext_t; |
| 23 |
#endif |
| 24 |
|
| 25 |
struct sigaltstack { |
| 26 |
void *ss_sp; |
| 27 |
int ss_flags; |
| 28 |
size_t ss_size; |
| 29 |
}; |
| 30 |
|
| 31 |
typedef struct __ucontext { |
| 32 |
unsigned long uc_flags; |
| 33 |
struct __ucontext *uc_link; |
| 34 |
stack_t uc_stack; |
| 35 |
mcontext_t uc_mcontext; |
| 36 |
sigset_t uc_sigmask; |
| 37 |
unsigned long long uc_regspace[64]; |
| 38 |
} ucontext_t; |
| 39 |
|
| 40 |
#define SA_NOCLDSTOP 1 |
| 41 |
#define SA_NOCLDWAIT 2 |
| 42 |
#define SA_SIGINFO 4 |
| 43 |
#define SA_ONSTACK 0x08000000 |
| 44 |
#define SA_RESTART 0x10000000 |
| 45 |
#define SA_NODEFER 0x40000000 |
| 46 |
#define SA_RESETHAND 0x80000000 |
| 47 |
#define SA_RESTORER 0x04000000 |
| 48 |
|
| 49 |
#endif |
| 50 |
|
| 51 |
#define SIGHUP 1 |
| 52 |
#define SIGINT 2 |
| 53 |
#define SIGQUIT 3 |
| 54 |
#define SIGILL 4 |
| 55 |
#define SIGTRAP 5 |
| 56 |
#define SIGABRT 6 |
| 57 |
#define SIGIOT SIGABRT |
| 58 |
#define SIGBUS 7 |
| 59 |
#define SIGFPE 8 |
| 60 |
#define SIGKILL 9 |
| 61 |
#define SIGUSR1 10 |
| 62 |
#define SIGSEGV 11 |
| 63 |
#define SIGUSR2 12 |
| 64 |
#define SIGPIPE 13 |
| 65 |
#define SIGALRM 14 |
| 66 |
#define SIGTERM 15 |
| 67 |
#define SIGSTKFLT 16 |
| 68 |
#define SIGCHLD 17 |
| 69 |
#define SIGCONT 18 |
| 70 |
#define SIGSTOP 19 |
| 71 |
#define SIGTSTP 20 |
| 72 |
#define SIGTTIN 21 |
| 73 |
#define SIGTTOU 22 |
| 74 |
#define SIGURG 23 |
| 75 |
#define SIGXCPU 24 |
| 76 |
#define SIGXFSZ 25 |
| 77 |
#define SIGVTALRM 26 |
| 78 |
#define SIGPROF 27 |
| 79 |
#define SIGWINCH 28 |
| 80 |
#define SIGIO 29 |
| 81 |
#define SIGPOLL 29 |
| 82 |
#define SIGPWR 30 |
| 83 |
#define SIGSYS 31 |
| 84 |
#define SIGUNUSED SIGSYS |
| 85 |
|
| 86 |
#define _NSIG 65 |