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