master
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)
10typedef int greg_t, gregset_t[18];
11typedef struct sigcontext
12{
13 unsigned long r0, r1, r2, r3;
14 unsigned long r4, r5, r6, r7;
15 unsigned long r8, r9, r10, r11;
16 unsigned long r12, r13, r14, r15;
17 unsigned long r16, r17, r18, r19;
18 unsigned long r20, r21, r22, r23;
19 unsigned long r24, r25, r26, r27;
20 unsigned long r28, r29, r30, r31;
21 unsigned long sa0;
22 unsigned long lc0;
23 unsigned long sa1;
24 unsigned long lc1;
25 unsigned long m0;
26 unsigned long m1;
27 unsigned long usr;
28 unsigned long p3_0;
29 unsigned long gp;
30 unsigned long ugp;
31 unsigned long pc;
32 unsigned long cause;
33 unsigned long badva;
34 unsigned long pad1;
35 unsigned long long pad2;
36} mcontext_t;
37#else
38typedef struct {
39 unsigned long __regs[48];
40} __attribute__((__aligned__(8))) mcontext_t;
41#endif
42
43struct sigaltstack {
44 void *ss_sp;
45 int ss_flags;
46 size_t ss_size;
47};
48
49typedef struct __ucontext {
50 unsigned long uc_flags;
51 struct __ucontext *uc_link;
52 stack_t uc_stack;
53 mcontext_t uc_mcontext;
54 sigset_t uc_sigmask;
55} ucontext_t;
56
57#define SA_NOCLDSTOP 1
58#define SA_NOCLDWAIT 2
59#define SA_SIGINFO 4
60#define SA_ONSTACK 0x08000000
61#define SA_RESTART 0x10000000
62#define SA_NODEFER 0x40000000
63#define SA_RESETHAND 0x80000000
64
65#endif
66
67#define SIGHUP 1
68#define SIGINT 2
69#define SIGQUIT 3
70#define SIGILL 4
71#define SIGTRAP 5
72#define SIGABRT 6
73#define SIGIOT SIGABRT
74#define SIGBUS 7
75#define SIGFPE 8
76#define SIGKILL 9
77#define SIGUSR1 10
78#define SIGSEGV 11
79#define SIGUSR2 12
80#define SIGPIPE 13
81#define SIGALRM 14
82#define SIGTERM 15
83#define SIGSTKFLT 16
84#define SIGCHLD 17
85#define SIGCONT 18
86#define SIGSTOP 19
87#define SIGTSTP 20
88#define SIGTTIN 21
89#define SIGTTOU 22
90#define SIGURG 23
91#define SIGXCPU 24
92#define SIGXFSZ 25
93#define SIGVTALRM 26
94#define SIGPROF 27
95#define SIGWINCH 28
96#define SIGIO 29
97#define SIGPOLL 29
98#define SIGPWR 30
99#define SIGSYS 31
100#define SIGUNUSED SIGSYS
101
102#define _NSIG 65