Path: blob/master/include/uapi/asm-generic/signal-defs.h
26282 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef __ASM_GENERIC_SIGNAL_DEFS_H2#define __ASM_GENERIC_SIGNAL_DEFS_H34#include <linux/compiler.h>56/*7* SA_FLAGS values:8*9* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.10* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.11* SA_SIGINFO delivers the signal with SIGINFO structs.12* SA_ONSTACK indicates that a registered stack_t will be used.13* SA_RESTART flag to get restarting signals (which were the default long ago)14* SA_NODEFER prevents the current signal from being masked in the handler.15* SA_RESETHAND clears the handler when the signal is delivered.16* SA_UNSUPPORTED is a flag bit that will never be supported. Kernels from17* before the introduction of SA_UNSUPPORTED did not clear unknown bits from18* sa_flags when read using the oldact argument to sigaction and rt_sigaction,19* so this bit allows flag bit support to be detected from userspace while20* allowing an old kernel to be distinguished from a kernel that supports every21* flag bit.22* SA_EXPOSE_TAGBITS exposes an architecture-defined set of tag bits in23* siginfo.si_addr.24*25* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single26* Unix names RESETHAND and NODEFER respectively.27*/28#ifndef SA_NOCLDSTOP29#define SA_NOCLDSTOP 0x0000000130#endif31#ifndef SA_NOCLDWAIT32#define SA_NOCLDWAIT 0x0000000233#endif34#ifndef SA_SIGINFO35#define SA_SIGINFO 0x0000000436#endif37/* 0x00000008 used on alpha, mips, parisc */38/* 0x00000010 used on alpha, parisc */39/* 0x00000020 used on alpha, parisc, sparc */40/* 0x00000040 used on alpha, parisc */41/* 0x00000080 used on parisc */42/* 0x00000100 used on sparc */43/* 0x00000200 used on sparc */44#define SA_UNSUPPORTED 0x0000040045#define SA_EXPOSE_TAGBITS 0x0000080046/* 0x00010000 used on mips */47/* 0x00800000 used for internal SA_IMMUTABLE */48/* 0x01000000 used on x86 */49/* 0x02000000 used on x86 */50/*51* New architectures should not define the obsolete52* SA_RESTORER 0x0400000053*/54#ifndef SA_ONSTACK55#define SA_ONSTACK 0x0800000056#endif57#ifndef SA_RESTART58#define SA_RESTART 0x1000000059#endif60#ifndef SA_NODEFER61#define SA_NODEFER 0x4000000062#endif63#ifndef SA_RESETHAND64#define SA_RESETHAND 0x8000000065#endif6667#define SA_NOMASK SA_NODEFER68#define SA_ONESHOT SA_RESETHAND6970#ifndef SIG_BLOCK71#define SIG_BLOCK 0 /* for blocking signals */72#endif73#ifndef SIG_UNBLOCK74#define SIG_UNBLOCK 1 /* for unblocking signals */75#endif76#ifndef SIG_SETMASK77#define SIG_SETMASK 2 /* for setting the signal mask */78#endif7980#ifndef __ASSEMBLY__81typedef void __signalfn_t(int);82typedef __signalfn_t __user *__sighandler_t;8384typedef void __restorefn_t(void);85typedef __restorefn_t __user *__sigrestore_t;8687#define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */88#define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */89#define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */90#endif9192#endif /* __ASM_GENERIC_SIGNAL_DEFS_H */939495