Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #ifndef _UAPI_ASM_GENERIC_SIGINFO_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define _UAPI_ASM_GENERIC_SIGINFO_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <linux/compiler.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) typedef union sigval {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 	int sival_int;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 	void __user *sival_ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) } sigval_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #define SI_MAX_SIZE	128
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  * The default "si_band" type is "long", as specified by POSIX.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  * However, some architectures want to override this to "int"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  * for historical compatibility reasons, so we allow that.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #ifndef __ARCH_SI_BAND_T
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #define __ARCH_SI_BAND_T long
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #ifndef __ARCH_SI_CLOCK_T
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #define __ARCH_SI_CLOCK_T __kernel_clock_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #ifndef __ARCH_SI_ATTRIBUTES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #define __ARCH_SI_ATTRIBUTES
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) union __sifields {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	/* kill() */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 		__kernel_pid_t _pid;	/* sender's pid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 		__kernel_uid32_t _uid;	/* sender's uid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	} _kill;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	/* POSIX.1b timers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 		__kernel_timer_t _tid;	/* timer id */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 		int _overrun;		/* overrun count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 		sigval_t _sigval;	/* same as below */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 		int _sys_private;       /* not to be passed to user */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	} _timer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	/* POSIX.1b signals */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 		__kernel_pid_t _pid;	/* sender's pid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		__kernel_uid32_t _uid;	/* sender's uid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		sigval_t _sigval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	} _rt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	/* SIGCHLD */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 		__kernel_pid_t _pid;	/* which child */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 		__kernel_uid32_t _uid;	/* sender's uid */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 		int _status;		/* exit code */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		__ARCH_SI_CLOCK_T _utime;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 		__ARCH_SI_CLOCK_T _stime;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	} _sigchld;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 		void __user *_addr; /* faulting insn/memory ref. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) #ifdef __ARCH_SI_TRAPNO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 		int _trapno;	/* TRAP # which caused the signal */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) #ifdef __ia64__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		int _imm;		/* immediate value for "break" */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		unsigned int _flags;	/* see ia64 si_flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		unsigned long _isr;	/* isr */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) #define __ADDR_BND_PKEY_PAD  (__alignof__(void *) < sizeof(short) ? \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 			      sizeof(short) : __alignof__(void *))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 			/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 			 * used when si_code=BUS_MCEERR_AR or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 			 * used when si_code=BUS_MCEERR_AO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 			 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 			short _addr_lsb; /* LSB of the reported address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 			/* used when si_code=SEGV_BNDERR */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 			struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 				char _dummy_bnd[__ADDR_BND_PKEY_PAD];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 				void __user *_lower;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 				void __user *_upper;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 			} _addr_bnd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 			/* used when si_code=SEGV_PKUERR */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 			struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 				char _dummy_pkey[__ADDR_BND_PKEY_PAD];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 				__u32 _pkey;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 			} _addr_pkey;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 		};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	} _sigfault;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	/* SIGPOLL */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		__ARCH_SI_BAND_T _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 		int _fd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	} _sigpoll;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	/* SIGSYS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		void __user *_call_addr; /* calling user insn */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 		int _syscall;	/* triggering system call number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		unsigned int _arch;	/* AUDIT_ARCH_* of syscall */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	} _sigsys;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) #ifndef __ARCH_HAS_SWAPPED_SIGINFO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) #define __SIGINFO 			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) struct {				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	int si_signo;			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	int si_errno;			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	int si_code;			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	union __sifields _sifields;	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) #define __SIGINFO 			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) struct {				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	int si_signo;			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	int si_code;			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	int si_errno;			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	union __sifields _sifields;	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) #endif /* __ARCH_HAS_SWAPPED_SIGINFO */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) typedef struct siginfo {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		__SIGINFO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		int _si_pad[SI_MAX_SIZE/sizeof(int)];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) } __ARCH_SI_ATTRIBUTES siginfo_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)  * How these fields are to be accessed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) #define si_pid		_sifields._kill._pid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) #define si_uid		_sifields._kill._uid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) #define si_tid		_sifields._timer._tid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) #define si_overrun	_sifields._timer._overrun
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) #define si_sys_private  _sifields._timer._sys_private
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) #define si_status	_sifields._sigchld._status
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) #define si_utime	_sifields._sigchld._utime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) #define si_stime	_sifields._sigchld._stime
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) #define si_value	_sifields._rt._sigval
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) #define si_int		_sifields._rt._sigval.sival_int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) #define si_ptr		_sifields._rt._sigval.sival_ptr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) #define si_addr		_sifields._sigfault._addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) #ifdef __ARCH_SI_TRAPNO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #define si_trapno	_sifields._sigfault._trapno
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) #define si_addr_lsb	_sifields._sigfault._addr_lsb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) #define si_lower	_sifields._sigfault._addr_bnd._lower
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) #define si_upper	_sifields._sigfault._addr_bnd._upper
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) #define si_pkey		_sifields._sigfault._addr_pkey._pkey
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) #define si_band		_sifields._sigpoll._band
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) #define si_fd		_sifields._sigpoll._fd
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) #define si_call_addr	_sifields._sigsys._call_addr
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) #define si_syscall	_sifields._sigsys._syscall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) #define si_arch		_sifields._sigsys._arch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)  * si_code values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)  * Digital reserves positive values for kernel-generated signals.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) #define SI_USER		0		/* sent by kill, sigsend, raise */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) #define SI_KERNEL	0x80		/* sent by the kernel from somewhere */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) #define SI_QUEUE	-1		/* sent by sigqueue */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) #define SI_TIMER	-2		/* sent by timer expiration */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) #define SI_MESGQ	-3		/* sent by real time mesq state change */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) #define SI_ASYNCIO	-4		/* sent by AIO completion */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) #define SI_SIGIO	-5		/* sent by queued SIGIO */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) #define SI_TKILL	-6		/* sent by tkill system call */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) #define SI_DETHREAD	-7		/* sent by execve() killing subsidiary threads */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) #define SI_ASYNCNL	-60		/* sent by glibc async name lookup completion */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) #define SI_FROMUSER(siptr)	((siptr)->si_code <= 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) #define SI_FROMKERNEL(siptr)	((siptr)->si_code > 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183)  * SIGILL si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) #define ILL_ILLOPC	1	/* illegal opcode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) #define ILL_ILLOPN	2	/* illegal operand */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) #define ILL_ILLADR	3	/* illegal addressing mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) #define ILL_ILLTRP	4	/* illegal trap */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) #define ILL_PRVOPC	5	/* privileged opcode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) #define ILL_PRVREG	6	/* privileged register */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) #define ILL_COPROC	7	/* coprocessor error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) #define ILL_BADSTK	8	/* internal stack error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) #define ILL_BADIADDR	9	/* unimplemented instruction address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) #define __ILL_BREAK	10	/* illegal break */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) #define __ILL_BNDMOD	11	/* bundle-update (modification) in progress */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) #define NSIGILL		11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)  * SIGFPE si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) #define FPE_INTDIV	1	/* integer divide by zero */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) #define FPE_INTOVF	2	/* integer overflow */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) #define FPE_FLTDIV	3	/* floating point divide by zero */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) #define FPE_FLTOVF	4	/* floating point overflow */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) #define FPE_FLTUND	5	/* floating point underflow */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) #define FPE_FLTRES	6	/* floating point inexact result */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) #define FPE_FLTINV	7	/* floating point invalid operation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) #define FPE_FLTSUB	8	/* subscript out of range */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) #define __FPE_DECOVF	9	/* decimal overflow */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) #define __FPE_DECDIV	10	/* decimal division by zero */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) #define __FPE_DECERR	11	/* packed decimal error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) #define __FPE_INVASC	12	/* invalid ASCII digit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) #define __FPE_INVDEC	13	/* invalid decimal digit */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) #define FPE_FLTUNK	14	/* undiagnosed floating-point exception */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) #define FPE_CONDTRAP	15	/* trap on condition */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) #define NSIGFPE		15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)  * SIGSEGV si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) #define SEGV_MAPERR	1	/* address not mapped to object */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) #define SEGV_ACCERR	2	/* invalid permissions for mapped object */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) #define SEGV_BNDERR	3	/* failed address bound checks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) #ifdef __ia64__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) # define __SEGV_PSTKOVF	4	/* paragraph stack overflow */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) # define SEGV_PKUERR	4	/* failed protection key checks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) #define SEGV_ACCADI	5	/* ADI not enabled for mapped object */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) #define SEGV_ADIDERR	6	/* Disrupting MCD error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) #define SEGV_ADIPERR	7	/* Precise MCD exception */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) #define SEGV_MTEAERR	8	/* Asynchronous ARM MTE error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) #define SEGV_MTESERR	9	/* Synchronous ARM MTE exception */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) #define NSIGSEGV	9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)  * SIGBUS si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) #define BUS_ADRALN	1	/* invalid address alignment */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) #define BUS_ADRERR	2	/* non-existent physical address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) #define BUS_OBJERR	3	/* object specific hardware error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) /* hardware memory error consumed on a machine check: action required */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) #define BUS_MCEERR_AR	4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) /* hardware memory error detected in process but not consumed: action optional*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) #define BUS_MCEERR_AO	5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) #define NSIGBUS		5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)  * SIGTRAP si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) #define TRAP_BRKPT	1	/* process breakpoint */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) #define TRAP_TRACE	2	/* process trace trap */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) #define TRAP_BRANCH     3	/* process taken branch trap */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) #define TRAP_HWBKPT     4	/* hardware breakpoint/watchpoint */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) #define TRAP_UNK	5	/* undiagnosed trap */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) #define NSIGTRAP	5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)  * There is an additional set of SIGTRAP si_codes used by ptrace
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)  * that are of the form: ((PTRACE_EVENT_XXX << 8) | SIGTRAP)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)  * SIGCHLD si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) #define CLD_EXITED	1	/* child has exited */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) #define CLD_KILLED	2	/* child was killed */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) #define CLD_DUMPED	3	/* child terminated abnormally */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) #define CLD_TRAPPED	4	/* traced child has trapped */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) #define CLD_STOPPED	5	/* child has stopped */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) #define CLD_CONTINUED	6	/* stopped child has continued */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) #define NSIGCHLD	6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)  * SIGPOLL (or any other signal without signal specific si_codes) si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) #define POLL_IN		1	/* data input available */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) #define POLL_OUT	2	/* output buffers available */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) #define POLL_MSG	3	/* input message available */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) #define POLL_ERR	4	/* i/o error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) #define POLL_PRI	5	/* high priority input available */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) #define POLL_HUP	6	/* device disconnected */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) #define NSIGPOLL	6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)  * SIGSYS si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) #define SYS_SECCOMP	1	/* seccomp triggered */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) #define NSIGSYS		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)  * SIGEMT si_codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) #define EMT_TAGOVF	1	/* tag overflow */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) #define NSIGEMT		1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298)  * sigevent definitions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)  * 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)  * It seems likely that SIGEV_THREAD will have to be handled from 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301)  * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302)  * thread manager then catches and does the appropriate nonsense.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303)  * However, everything is written out here so as to not get lost.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) #define SIGEV_SIGNAL	0	/* notify via signal */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) #define SIGEV_NONE	1	/* other notification: meaningless */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) #define SIGEV_THREAD	2	/* deliver via thread creation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) #define SIGEV_THREAD_ID 4	/* deliver to thread */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)  * This works because the alignment is ok on all current architectures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)  * but we leave open this being overridden in the future
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) #ifndef __ARCH_SIGEV_PREAMBLE_SIZE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) #define __ARCH_SIGEV_PREAMBLE_SIZE	(sizeof(int) * 2 + sizeof(sigval_t))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) #define SIGEV_MAX_SIZE	64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) #define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 		/ sizeof(int))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) typedef struct sigevent {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 	sigval_t sigev_value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 	int sigev_signo;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) 	int sigev_notify;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 	union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 		int _pad[SIGEV_PAD_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 		 int _tid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 		struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 			void (*_function)(sigval_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 			void *_attribute;	/* really pthread_attr_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) 		} _sigev_thread;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 	} _sigev_un;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) } sigevent_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) #define sigev_notify_function	_sigev_un._sigev_thread._function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) #define sigev_notify_attributes	_sigev_un._sigev_thread._attribute
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) #define sigev_notify_thread_id	 _sigev_un._tid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) #endif /* _UAPI_ASM_GENERIC_SIGINFO_H */