Port musl to x86-64. One giant commit!
[musl] / arch / x86_64 / bits / signal.h
1 struct __siginfo
2 {
3         int si_signo;
4         int si_errno;
5         int si_code;
6         union
7         {
8                 int __pad[(128 - 4*sizeof(int)) / sizeof(int)];
9                 struct {
10                         pid_t si_pid;
11                         uid_t si_uid;
12                 } __kill;
13                 struct {
14                         timer_t si_timerid;
15                         int si_overrun;
16                         char __pad[sizeof(uid_t) - sizeof(int)];
17                         union sigval si_sigval;
18                         int si_private;
19                 } __timer;
20                 struct {
21                         pid_t si_pid;
22                         uid_t si_uid;
23                         union sigval si_sigval;
24                 } __rt;
25                 struct {
26                         pid_t si_pid;
27                         uid_t si_uid;
28                         int si_status;
29                         clock_t si_utime;
30                         clock_t si_stime;
31                 } __sigchld;
32                 struct {
33                         void *si_addr;
34                         short addr_lsb;
35                 } __sigfault;
36                 struct {
37                         long si_band;
38                         int si_fd;
39                 } __sigpoll;
40         } __si_fields;
41 };
42
43 #define si_pid     __si_fields.__sigchld.si_pid
44 #define si_uid     __si_fields.__sigchld.si_uid
45 #define si_status  __si_fields.__sigchld.si_status
46 #define si_utime   __si_fields.__sigchld.si_utime
47 #define si_stime   __si_fields.__sigchld.si_stime
48 #define si_value   __si_fields.__rt.si_sigval
49 #define si_addr    __si_fields.__sigfault.si_addr
50 #define si_band    __si_fields.__sigpoll.si_band
51
52 #define SA_NOCLDSTOP  1
53 #define SA_NOCLDWAIT  2
54 #define SA_SIGINFO    4
55 #define SA_ONSTACK    0x08000000
56 #define SA_RESTART    0x10000000
57 #define SA_NODEFER    0x40000000
58 #define SA_RESETHAND  0x80000000
59 #define SA_RESTORER   0x04000000
60
61 #define SS_ONSTACK    1
62 #define SS_DISABLE    2
63
64 #define SIG_BLOCK     0
65 #define SIG_UNBLOCK   1
66 #define SIG_SETMASK   2
67
68 #define SIG_ERR  ((void (*)(int))-1)
69 #define SIG_DFL  ((void (*)(int)) 0)
70 #define SIG_IGN  ((void (*)(int)) 1)
71 #define SIG_HOLD ((void (*)(int)) 2)
72
73 #define NSIG      64
74
75 #define SIGHUP    1
76 #define SIGINT    2
77 #define SIGQUIT   3
78 #define SIGILL    4
79 #define SIGTRAP   5
80 #define SIGABRT   6
81 #define SIGBUS    7
82 #define SIGFPE    8
83 #define SIGKILL   9
84 #define SIGUSR1   10
85 #define SIGSEGV   11
86 #define SIGUSR2   12
87 #define SIGPIPE   13
88 #define SIGALRM   14
89 #define SIGTERM   15
90 #define SIGSTKFLT 16
91 #define SIGCHLD   17
92 #define SIGCONT   18
93 #define SIGSTOP   19
94 #define SIGTSTP   20
95 #define SIGTTIN   21
96 #define SIGTTOU   22
97 #define SIGURG    23
98 #define SIGXCPU   24
99 #define SIGXFSZ   25
100 #define SIGVTALRM 26
101 #define SIGPROF   27
102 #define SIGWINCH  28
103 #define SIGIO     29
104 #define SIGPOLL   29
105 #define SIGPWR    30
106 #define SIGSYS    31
107 #define SIGUNUSED SIGSYS