Go to the documentation of this file. 1 #ifndef _ASM_X86_SIGNAL_H
2 #define _ASM_X86_SIGNAL_H
5 #include <linux/types.h>
6 #include <linux/time.h>
7 #include <linux/compiler.h>
13 #include <linux/linkage.h>
26 #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
87 #define SIGRTMAX _NSIG
102 #define SA_NOCLDSTOP 0x00000001u
103 #define SA_NOCLDWAIT 0x00000002u
104 #define SA_SIGINFO 0x00000004u
105 #define SA_ONSTACK 0x08000000u
106 #define SA_RESTART 0x10000000u
107 #define SA_NODEFER 0x40000000u
108 #define SA_RESETHAND 0x80000000u
110 #define SA_NOMASK SA_NODEFER
111 #define SA_ONESHOT SA_RESETHAND
113 #define SA_RESTORER 0x04000000
121 #define MINSIGSTKSZ 2048
122 #define SIGSTKSZ 8192
165 #define sa_handler _u._sa_handler
166 #define sa_sigaction _u._sa_sigaction
191 #include <asm/sigcontext.h>
195 #define __HAVE_ARCH_SIG_BITOPS
197 #define sigaddset(set,sig) \
198 (__builtin_constant_p(sig) \
199 ? __const_sigaddset((set), (sig)) \
200 : __gen_sigaddset((set), (sig)))
202 static inline void __gen_sigaddset(
sigset_t *
set,
int _sig)
204 asm(
"btsl %1,%0" :
"+m"(*set) :
"Ir"(_sig - 1) :
"cc");
207 static inline void __const_sigaddset(
sigset_t *
set,
int _sig)
209 unsigned long sig = _sig - 1;
213 #define sigdelset(set, sig) \
214 (__builtin_constant_p(sig) \
215 ? __const_sigdelset((set), (sig)) \
216 : __gen_sigdelset((set), (sig)))
219 static inline void __gen_sigdelset(
sigset_t *
set,
int _sig)
221 asm(
"btrl %1,%0" :
"+m"(*set) :
"Ir"(_sig - 1) :
"cc");
224 static inline void __const_sigdelset(
sigset_t *
set,
int _sig)
226 unsigned long sig = _sig - 1;
230 static inline int __const_sigismember(
sigset_t *
set,
int _sig)
232 unsigned long sig = _sig - 1;
236 static inline int __gen_sigismember(
sigset_t *
set,
int _sig)
239 asm(
"btl %2,%1\n\tsbbl %0,%0"
240 :
"=r"(
ret) :
"m"(*
set),
"Ir"(_sig-1) :
"cc");
244 #define sigismember(set, sig) \
245 (__builtin_constant_p(sig) \
246 ? __const_sigismember((set), (sig)) \
247 : __gen_sigismember((set), (sig)))
249 static inline int sigfindinword(
unsigned long word)
251 asm(
"bsfl %1,%0" :
"=r"(
word) :
"rm"(word) :
"cc");
259 #undef __HAVE_ARCH_SIG_BITOPS
263 #define ptrace_signal_deliver(regs, cookie) do { } while (0)