f899663cd479676f709bd7c9baa63b8baf75f05a
[musl] / arch / i386 / bits / signal.h
1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3
4 struct __fpstate {
5         unsigned long __x[7];
6         unsigned char __y[80];
7         unsigned long __z;
8 };
9
10 typedef struct {
11         unsigned long __gregs[19];
12         void *__fpregs;
13         unsigned long __oldmask, __cr2;
14 } mcontext_t;
15
16 typedef struct __ucontext {
17         unsigned long uc_flags;
18         struct __ucontext *uc_link;
19         stack_t uc_stack;
20         mcontext_t uc_mcontext;
21         sigset_t uc_sigmask;
22         struct __fpstate __fpregs_mem;
23 } ucontext_t;
24
25 #define SA_NOCLDSTOP  1
26 #define SA_NOCLDWAIT  2
27 #define SA_SIGINFO    4
28 #define SA_ONSTACK    0x08000000
29 #define SA_RESTART    0x10000000
30 #define SA_NODEFER    0x40000000
31 #define SA_RESETHAND  0x80000000
32 #define SA_RESTORER   0x04000000
33
34 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
35 struct sigcontext {
36         unsigned short gs, __gsh, fs, __fsh, es, __esh, ds, __dsh;
37         unsigned long edi, esi, ebp, esp, ebx, edx, ecx, eax;
38         unsigned long trapno, err, eip;
39         unsigned short cs, __csh;
40         unsigned long eflags, esp_at_signal;
41         unsigned short ss, __ssh;
42         struct __fpstate *fpstate;
43         unsigned long oldmask, cr2;
44 };
45 #define NSIG      64
46 #endif
47
48 #endif
49
50 #define SIGHUP    1
51 #define SIGINT    2
52 #define SIGQUIT   3
53 #define SIGILL    4
54 #define SIGTRAP   5
55 #define SIGABRT   6
56 #define SIGBUS    7
57 #define SIGFPE    8
58 #define SIGKILL   9
59 #define SIGUSR1   10
60 #define SIGSEGV   11
61 #define SIGUSR2   12
62 #define SIGPIPE   13
63 #define SIGALRM   14
64 #define SIGTERM   15
65 #define SIGSTKFLT 16
66 #define SIGCHLD   17
67 #define SIGCONT   18
68 #define SIGSTOP   19
69 #define SIGTSTP   20
70 #define SIGTTIN   21
71 #define SIGTTOU   22
72 #define SIGURG    23
73 #define SIGXCPU   24
74 #define SIGXFSZ   25
75 #define SIGVTALRM 26
76 #define SIGPROF   27
77 #define SIGWINCH  28
78 #define SIGIO     29
79 #define SIGPOLL   29
80 #define SIGPWR    30
81 #define SIGSYS    31
82 #define SIGUNUSED SIGSYS
83
84 #define _NSIG 65