3caadea2bfd2593649005a88d25387aa264ad2e6
[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 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
5 struct _fpstate {
6         unsigned long cw, sw, tag, ipoff, cssel, dataoff, datasel;
7         struct {
8                 unsigned short significand[4], exponent;
9         } _st[8];
10         unsigned long status;
11 };
12 struct sigcontext {
13         unsigned short gs, __gsh, fs, __fsh, es, __esh, ds, __dsh;
14         unsigned long edi, esi, ebp, esp, ebx, edx, ecx, eax;
15         unsigned long trapno, err, eip;
16         unsigned short cs, __csh;
17         unsigned long eflags, esp_at_signal;
18         unsigned short ss, __ssh;
19         struct _fpstate *fpstate;
20         unsigned long oldmask, cr2;
21 };
22 typedef struct {
23         unsigned gregs[19];
24         struct _fpstate *fpregs;
25         unsigned long oldmask, cr2;
26 } mcontext_t;
27 #else
28 typedef struct {
29         unsigned __space[22];
30 } mcontext_t;
31 #endif
32
33 typedef struct __ucontext {
34         unsigned long uc_flags;
35         struct __ucontext *uc_link;
36         stack_t uc_stack;
37         mcontext_t uc_mcontext;
38         sigset_t uc_sigmask;
39         unsigned long __fpregs_mem[28];
40 } ucontext_t;
41
42 #define SA_NOCLDSTOP  1
43 #define SA_NOCLDWAIT  2
44 #define SA_SIGINFO    4
45 #define SA_ONSTACK    0x08000000
46 #define SA_RESTART    0x10000000
47 #define SA_NODEFER    0x40000000
48 #define SA_RESETHAND  0x80000000
49 #define SA_RESTORER   0x04000000
50
51 #endif
52
53 #define SIGHUP    1
54 #define SIGINT    2
55 #define SIGQUIT   3
56 #define SIGILL    4
57 #define SIGTRAP   5
58 #define SIGABRT   6
59 #define SIGBUS    7
60 #define SIGFPE    8
61 #define SIGKILL   9
62 #define SIGUSR1   10
63 #define SIGSEGV   11
64 #define SIGUSR2   12
65 #define SIGPIPE   13
66 #define SIGALRM   14
67 #define SIGTERM   15
68 #define SIGSTKFLT 16
69 #define SIGCHLD   17
70 #define SIGCONT   18
71 #define SIGSTOP   19
72 #define SIGTSTP   20
73 #define SIGTTIN   21
74 #define SIGTTOU   22
75 #define SIGURG    23
76 #define SIGXCPU   24
77 #define SIGXFSZ   25
78 #define SIGVTALRM 26
79 #define SIGPROF   27
80 #define SIGWINCH  28
81 #define SIGIO     29
82 #define SIGPOLL   29
83 #define SIGPWR    30
84 #define SIGSYS    31
85 #define SIGUNUSED SIGSYS
86
87 #define _NSIG 65