40 |
40 |
41 #include <sys/cdefs.h> |
41 #include <sys/cdefs.h> |
42 #include <sys/_types.h> |
42 #include <sys/_types.h> |
43 #include <sys/_sigset.h> |
43 #include <sys/_sigset.h> |
44 |
44 |
45 #include <machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */ |
45 #include <stdapis/machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */ |
46 |
46 |
47 /* |
47 /* |
48 * System defined signals. |
48 * System defined signals. |
49 */ |
49 */ |
50 #define SIGHUP 1 /* hangup */ |
50 #define SIGHUP 1 /* hangup */ |
79 #define SIGINFO 29 /* information request */ |
79 #define SIGINFO 29 /* information request */ |
80 #define SIGUSR1 30 /* user defined signal 1 */ |
80 #define SIGUSR1 30 /* user defined signal 1 */ |
81 #define SIGUSR2 31 /* user defined signal 2 */ |
81 #define SIGUSR2 31 /* user defined signal 2 */ |
82 #define SIGTHR 32 /* Thread interrupt. */ |
82 #define SIGTHR 32 /* Thread interrupt. */ |
83 |
83 |
|
84 #define SIGRTMIN 33 |
|
85 #define SIGRTMAX 64 |
84 /* |
86 /* |
85 * XXX missing SIGRTMIN, SIGRTMAX. |
87 * XXX missing SIGRTMIN, SIGRTMAX. |
86 */ |
88 */ |
87 |
89 |
88 #define SIG_DFL ((__sighandler_t *)0) |
90 #define SIG_DFL ((__sighandler_t *)0) |
89 #define SIG_IGN ((__sighandler_t *)1) |
91 #define SIG_IGN ((__sighandler_t *)1) |
90 #define SIG_ERR ((__sighandler_t *)-1) |
92 #define SIG_ERR ((__sighandler_t *)-1) |
|
93 #define SIG_HOLD ((__sighandler_t *)3) |
|
94 |
|
95 |
91 /* |
96 /* |
92 * XXX missing SIG_HOLD. |
97 * XXX missing SIG_HOLD. |
93 */ |
98 */ |
94 |
99 |
95 /*- |
100 /*- |
108 * have the same calling protocol so there is no problem in practice. |
113 * have the same calling protocol so there is no problem in practice. |
109 * A bit in sa_flags could be used to specify the number of args. |
114 * A bit in sa_flags could be used to specify the number of args. |
110 */ |
115 */ |
111 typedef void __sighandler_t(int); |
116 typedef void __sighandler_t(int); |
112 |
117 |
113 #if __POSIX_VISIBLE || __XSI_VISIBLE |
|
114 #ifndef _SIGSET_T_DECLARED |
118 #ifndef _SIGSET_T_DECLARED |
115 #define _SIGSET_T_DECLARED |
119 #define _SIGSET_T_DECLARED |
116 typedef __sigset_t sigset_t; |
120 typedef __uint64_t sigset_t; |
117 #endif |
|
118 #endif |
121 #endif |
119 |
122 |
120 |
|
121 #if __POSIX_VISIBLE || __XSI_VISIBLE |
123 #if __POSIX_VISIBLE || __XSI_VISIBLE |
122 struct __siginfo; |
124 struct __siginfo_t; |
123 |
125 |
124 /* |
126 /* |
125 * Signal vector "template" used in sigaction call. |
127 * Signal vector "template" used in sigaction call. |
126 */ |
128 */ |
127 struct sigaction { |
129 struct sigaction { |
128 union { |
130 union { |
129 void (*__sa_handler)(int); |
131 void (*_sa_handler)(int); |
130 void (*__sa_sigaction)(int, struct __siginfo *, void *); |
132 void (*_sa_sigaction)(int, struct __siginfo_t*, void *); |
131 } __sigaction_u; /* signal handler */ |
133 } _sa_u; /* signal handler */ |
132 int sa_flags; /* see signal options below */ |
134 int sa_flags; /* see signal options below */ |
133 sigset_t sa_mask; /* signal mask to apply */ |
135 sigset_t sa_mask; /* signal mask to apply */ |
134 }; |
136 }; |
135 |
137 |
136 #define sa_handler __sigaction_u.__sa_handler |
138 #define sa_handler _sa_u._sa_handler |
|
139 #define sa_sigaction _sa_u._sa_sigaction |
|
140 |
137 #endif |
141 #endif |
138 |
142 |
139 #if __POSIX_VISIBLE || __XSI_VISIBLE |
143 #if __POSIX_VISIBLE || __XSI_VISIBLE |
140 #define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ |
144 #define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ |
141 #endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ |
145 #endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ |