brintos

brintos / linux-shallow public Read only

0
0
Text · 2.9 KiB · 7572f2f Raw
94 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2#ifndef __ASM_GENERIC_SIGNAL_DEFS_H3#define __ASM_GENERIC_SIGNAL_DEFS_H4 5#include <linux/compiler.h>6 7/*8 * SA_FLAGS values:9 *10 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.11 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.12 * SA_SIGINFO delivers the signal with SIGINFO structs.13 * SA_ONSTACK indicates that a registered stack_t will be used.14 * SA_RESTART flag to get restarting signals (which were the default long ago)15 * SA_NODEFER prevents the current signal from being masked in the handler.16 * SA_RESETHAND clears the handler when the signal is delivered.17 * SA_UNSUPPORTED is a flag bit that will never be supported. Kernels from18 * before the introduction of SA_UNSUPPORTED did not clear unknown bits from19 * sa_flags when read using the oldact argument to sigaction and rt_sigaction,20 * so this bit allows flag bit support to be detected from userspace while21 * allowing an old kernel to be distinguished from a kernel that supports every22 * flag bit.23 * SA_EXPOSE_TAGBITS exposes an architecture-defined set of tag bits in24 * siginfo.si_addr.25 *26 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single27 * Unix names RESETHAND and NODEFER respectively.28 */29#ifndef SA_NOCLDSTOP30#define SA_NOCLDSTOP	0x0000000131#endif32#ifndef SA_NOCLDWAIT33#define SA_NOCLDWAIT	0x0000000234#endif35#ifndef SA_SIGINFO36#define SA_SIGINFO	0x0000000437#endif38/* 0x00000008 used on alpha, mips, parisc */39/* 0x00000010 used on alpha, parisc */40/* 0x00000020 used on alpha, parisc, sparc */41/* 0x00000040 used on alpha, parisc */42/* 0x00000080 used on parisc */43/* 0x00000100 used on sparc */44/* 0x00000200 used on sparc */45#define SA_UNSUPPORTED	0x0000040046#define SA_EXPOSE_TAGBITS	0x0000080047/* 0x00010000 used on mips */48/* 0x00800000 used for internal SA_IMMUTABLE */49/* 0x01000000 used on x86 */50/* 0x02000000 used on x86 */51/*52 * New architectures should not define the obsolete53 *	SA_RESTORER	0x0400000054 */55#ifndef SA_ONSTACK56#define SA_ONSTACK	0x0800000057#endif58#ifndef SA_RESTART59#define SA_RESTART	0x1000000060#endif61#ifndef SA_NODEFER62#define SA_NODEFER	0x4000000063#endif64#ifndef SA_RESETHAND65#define SA_RESETHAND	0x8000000066#endif67 68#define SA_NOMASK	SA_NODEFER69#define SA_ONESHOT	SA_RESETHAND70 71#ifndef SIG_BLOCK72#define SIG_BLOCK          0	/* for blocking signals */73#endif74#ifndef SIG_UNBLOCK75#define SIG_UNBLOCK        1	/* for unblocking signals */76#endif77#ifndef SIG_SETMASK78#define SIG_SETMASK        2	/* for setting the signal mask */79#endif80 81#ifndef __ASSEMBLY__82typedef void __signalfn_t(int);83typedef __signalfn_t __user *__sighandler_t;84 85typedef void __restorefn_t(void);86typedef __restorefn_t __user *__sigrestore_t;87 88#define SIG_DFL	((__force __sighandler_t)0)	/* default signal handling */89#define SIG_IGN	((__force __sighandler_t)1)	/* ignore signal */90#define SIG_ERR	((__force __sighandler_t)-1)	/* error return from signal */91#endif92 93#endif /* __ASM_GENERIC_SIGNAL_DEFS_H */94