16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28a1ab315SDavid Howells #ifndef _UAPI_ASM_GENERIC_SIGINFO_H
38a1ab315SDavid Howells #define _UAPI_ASM_GENERIC_SIGINFO_H
48a1ab315SDavid Howells 
58a1ab315SDavid Howells #include <linux/compiler.h>
68a1ab315SDavid Howells #include <linux/types.h>
78a1ab315SDavid Howells 
88a1ab315SDavid Howells typedef union sigval {
98a1ab315SDavid Howells 	int sival_int;
108a1ab315SDavid Howells 	void __user *sival_ptr;
118a1ab315SDavid Howells } sigval_t;
128a1ab315SDavid Howells 
138a1ab315SDavid Howells /*
148a1ab315SDavid Howells  * This is the size (including padding) of the part of the
158a1ab315SDavid Howells  * struct siginfo that is before the union.
168a1ab315SDavid Howells  */
178a1ab315SDavid Howells #ifndef __ARCH_SI_PREAMBLE_SIZE
188a1ab315SDavid Howells #define __ARCH_SI_PREAMBLE_SIZE	(3 * sizeof(int))
198a1ab315SDavid Howells #endif
208a1ab315SDavid Howells 
218a1ab315SDavid Howells #define SI_MAX_SIZE	128
228a1ab315SDavid Howells #ifndef SI_PAD_SIZE
238a1ab315SDavid Howells #define SI_PAD_SIZE	((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
248a1ab315SDavid Howells #endif
258a1ab315SDavid Howells 
268a1ab315SDavid Howells /*
278a1ab315SDavid Howells  * The default "si_band" type is "long", as specified by POSIX.
288a1ab315SDavid Howells  * However, some architectures want to override this to "int"
298a1ab315SDavid Howells  * for historical compatibility reasons, so we allow that.
308a1ab315SDavid Howells  */
318a1ab315SDavid Howells #ifndef __ARCH_SI_BAND_T
328a1ab315SDavid Howells #define __ARCH_SI_BAND_T long
338a1ab315SDavid Howells #endif
348a1ab315SDavid Howells 
358a1ab315SDavid Howells #ifndef __ARCH_SI_CLOCK_T
368a1ab315SDavid Howells #define __ARCH_SI_CLOCK_T __kernel_clock_t
378a1ab315SDavid Howells #endif
388a1ab315SDavid Howells 
398a1ab315SDavid Howells #ifndef __ARCH_SI_ATTRIBUTES
408a1ab315SDavid Howells #define __ARCH_SI_ATTRIBUTES
418a1ab315SDavid Howells #endif
428a1ab315SDavid Howells 
438a1ab315SDavid Howells typedef struct siginfo {
448a1ab315SDavid Howells 	int si_signo;
4509d1415dSAl Viro #ifndef __ARCH_HAS_SWAPPED_SIGINFO
468a1ab315SDavid Howells 	int si_errno;
478a1ab315SDavid Howells 	int si_code;
4809d1415dSAl Viro #else
4909d1415dSAl Viro 	int si_code;
5009d1415dSAl Viro 	int si_errno;
5109d1415dSAl Viro #endif
528a1ab315SDavid Howells 
538a1ab315SDavid Howells 	union {
548a1ab315SDavid Howells 		int _pad[SI_PAD_SIZE];
558a1ab315SDavid Howells 
568a1ab315SDavid Howells 		/* kill() */
578a1ab315SDavid Howells 		struct {
588a1ab315SDavid Howells 			__kernel_pid_t _pid;	/* sender's pid */
594795477bSAl Viro 			__kernel_uid32_t _uid;	/* sender's uid */
608a1ab315SDavid Howells 		} _kill;
618a1ab315SDavid Howells 
628a1ab315SDavid Howells 		/* POSIX.1b timers */
638a1ab315SDavid Howells 		struct {
648a1ab315SDavid Howells 			__kernel_timer_t _tid;	/* timer id */
658a1ab315SDavid Howells 			int _overrun;		/* overrun count */
668a1ab315SDavid Howells 			sigval_t _sigval;	/* same as below */
678a1ab315SDavid Howells 			int _sys_private;       /* not to be passed to user */
688a1ab315SDavid Howells 		} _timer;
698a1ab315SDavid Howells 
708a1ab315SDavid Howells 		/* POSIX.1b signals */
718a1ab315SDavid Howells 		struct {
728a1ab315SDavid Howells 			__kernel_pid_t _pid;	/* sender's pid */
734795477bSAl Viro 			__kernel_uid32_t _uid;	/* sender's uid */
748a1ab315SDavid Howells 			sigval_t _sigval;
758a1ab315SDavid Howells 		} _rt;
768a1ab315SDavid Howells 
778a1ab315SDavid Howells 		/* SIGCHLD */
788a1ab315SDavid Howells 		struct {
798a1ab315SDavid Howells 			__kernel_pid_t _pid;	/* which child */
804795477bSAl Viro 			__kernel_uid32_t _uid;	/* sender's uid */
818a1ab315SDavid Howells 			int _status;		/* exit code */
828a1ab315SDavid Howells 			__ARCH_SI_CLOCK_T _utime;
838a1ab315SDavid Howells 			__ARCH_SI_CLOCK_T _stime;
848a1ab315SDavid Howells 		} _sigchld;
858a1ab315SDavid Howells 
86deaf19c0SEric W. Biederman 		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGTRAP, SIGEMT */
878a1ab315SDavid Howells 		struct {
888a1ab315SDavid Howells 			void __user *_addr; /* faulting insn/memory ref. */
898a1ab315SDavid Howells #ifdef __ARCH_SI_TRAPNO
908a1ab315SDavid Howells 			int _trapno;	/* TRAP # which caused the signal */
918a1ab315SDavid Howells #endif
922eb50e2eSEric W. Biederman #ifdef __ia64__
932eb50e2eSEric W. Biederman 			int _imm;		/* immediate value for "break" */
942eb50e2eSEric W. Biederman 			unsigned int _flags;	/* see ia64 si_flags */
952eb50e2eSEric W. Biederman 			unsigned long _isr;	/* isr */
962eb50e2eSEric W. Biederman #endif
97cd0ea35fSDave Hansen 			union {
98b68a68d3SEric W. Biederman 				/*
99b68a68d3SEric W. Biederman 				 * used when si_code=BUS_MCEERR_AR or
100b68a68d3SEric W. Biederman 				 * used when si_code=BUS_MCEERR_AO
101b68a68d3SEric W. Biederman 				 */
102b68a68d3SEric W. Biederman 				short _addr_lsb; /* LSB of the reported address */
103cd0ea35fSDave Hansen 				/* used when si_code=SEGV_BNDERR */
104ee1b58d3SQiaowei Ren 				struct {
105859d880cSEric W. Biederman 					void *_dummy_bnd;
106ee1b58d3SQiaowei Ren 					void __user *_lower;
107ee1b58d3SQiaowei Ren 					void __user *_upper;
108ee1b58d3SQiaowei Ren 				} _addr_bnd;
109cd0ea35fSDave Hansen 				/* used when si_code=SEGV_PKUERR */
110b68a68d3SEric W. Biederman 				struct {
111859d880cSEric W. Biederman 					void *_dummy_pkey;
11249cd53bfSDave Hansen 					__u32 _pkey;
113b68a68d3SEric W. Biederman 				} _addr_pkey;
114cd0ea35fSDave Hansen 			};
1158a1ab315SDavid Howells 		} _sigfault;
1168a1ab315SDavid Howells 
1178a1ab315SDavid Howells 		/* SIGPOLL */
1188a1ab315SDavid Howells 		struct {
1198a1ab315SDavid Howells 			__ARCH_SI_BAND_T _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
1208a1ab315SDavid Howells 			int _fd;
1218a1ab315SDavid Howells 		} _sigpoll;
1228a1ab315SDavid Howells 
1238a1ab315SDavid Howells 		/* SIGSYS */
1248a1ab315SDavid Howells 		struct {
1258a1ab315SDavid Howells 			void __user *_call_addr; /* calling user insn */
1268a1ab315SDavid Howells 			int _syscall;	/* triggering system call number */
1278a1ab315SDavid Howells 			unsigned int _arch;	/* AUDIT_ARCH_* of syscall */
1288a1ab315SDavid Howells 		} _sigsys;
1298a1ab315SDavid Howells 	} _sifields;
1308a1ab315SDavid Howells } __ARCH_SI_ATTRIBUTES siginfo_t;
1318a1ab315SDavid Howells 
1328a1ab315SDavid Howells /*
1338a1ab315SDavid Howells  * How these fields are to be accessed.
1348a1ab315SDavid Howells  */
1358a1ab315SDavid Howells #define si_pid		_sifields._kill._pid
1368a1ab315SDavid Howells #define si_uid		_sifields._kill._uid
1378a1ab315SDavid Howells #define si_tid		_sifields._timer._tid
1388a1ab315SDavid Howells #define si_overrun	_sifields._timer._overrun
1398a1ab315SDavid Howells #define si_sys_private  _sifields._timer._sys_private
1408a1ab315SDavid Howells #define si_status	_sifields._sigchld._status
1418a1ab315SDavid Howells #define si_utime	_sifields._sigchld._utime
1428a1ab315SDavid Howells #define si_stime	_sifields._sigchld._stime
1438a1ab315SDavid Howells #define si_value	_sifields._rt._sigval
1448a1ab315SDavid Howells #define si_int		_sifields._rt._sigval.sival_int
1458a1ab315SDavid Howells #define si_ptr		_sifields._rt._sigval.sival_ptr
1468a1ab315SDavid Howells #define si_addr		_sifields._sigfault._addr
1478a1ab315SDavid Howells #ifdef __ARCH_SI_TRAPNO
1488a1ab315SDavid Howells #define si_trapno	_sifields._sigfault._trapno
1498a1ab315SDavid Howells #endif
1508a1ab315SDavid Howells #define si_addr_lsb	_sifields._sigfault._addr_lsb
151ee1b58d3SQiaowei Ren #define si_lower	_sifields._sigfault._addr_bnd._lower
152ee1b58d3SQiaowei Ren #define si_upper	_sifields._sigfault._addr_bnd._upper
153b68a68d3SEric W. Biederman #define si_pkey		_sifields._sigfault._addr_pkey._pkey
1548a1ab315SDavid Howells #define si_band		_sifields._sigpoll._band
1558a1ab315SDavid Howells #define si_fd		_sifields._sigpoll._fd
1568a1ab315SDavid Howells #define si_call_addr	_sifields._sigsys._call_addr
1578a1ab315SDavid Howells #define si_syscall	_sifields._sigsys._syscall
1588a1ab315SDavid Howells #define si_arch		_sifields._sigsys._arch
1598a1ab315SDavid Howells 
1608a1ab315SDavid Howells /*
1618a1ab315SDavid Howells  * si_code values
1628a1ab315SDavid Howells  * Digital reserves positive values for kernel-generated signals.
1638a1ab315SDavid Howells  */
1648a1ab315SDavid Howells #define SI_USER		0		/* sent by kill, sigsend, raise */
1658a1ab315SDavid Howells #define SI_KERNEL	0x80		/* sent by the kernel from somewhere */
1668a1ab315SDavid Howells #define SI_QUEUE	-1		/* sent by sigqueue */
167cc731525SEric W. Biederman #define SI_TIMER	-2		/* sent by timer expiration */
168cc731525SEric W. Biederman #define SI_MESGQ	-3		/* sent by real time mesq state change */
1698a1ab315SDavid Howells #define SI_ASYNCIO	-4		/* sent by AIO completion */
170cc731525SEric W. Biederman #define SI_SIGIO	-5		/* sent by queued SIGIO */
1718a1ab315SDavid Howells #define SI_TKILL	-6		/* sent by tkill system call */
1728a1ab315SDavid Howells #define SI_DETHREAD	-7		/* sent by execve() killing subsidiary threads */
17375c0abb8SEric W. Biederman #define SI_ASYNCNL	-60		/* sent by glibc async name lookup completion */
1748a1ab315SDavid Howells 
1758a1ab315SDavid Howells #define SI_FROMUSER(siptr)	((siptr)->si_code <= 0)
1768a1ab315SDavid Howells #define SI_FROMKERNEL(siptr)	((siptr)->si_code > 0)
1778a1ab315SDavid Howells 
1788a1ab315SDavid Howells /*
1798a1ab315SDavid Howells  * SIGILL si_codes
1808a1ab315SDavid Howells  */
181cc731525SEric W. Biederman #define ILL_ILLOPC	1	/* illegal opcode */
18271ee78d5SEric W. Biederman #ifdef __bfin__
18371ee78d5SEric W. Biederman # define ILL_ILLPARAOP	2	/* illegal opcode combine */
18471ee78d5SEric W. Biederman #endif
185cc731525SEric W. Biederman #define ILL_ILLOPN	2	/* illegal operand */
186cc731525SEric W. Biederman #define ILL_ILLADR	3	/* illegal addressing mode */
187cc731525SEric W. Biederman #define ILL_ILLTRP	4	/* illegal trap */
18871ee78d5SEric W. Biederman #ifdef __bfin__
18971ee78d5SEric W. Biederman # define ILL_ILLEXCPT	4	/* unrecoverable exception */
19071ee78d5SEric W. Biederman #endif
191cc731525SEric W. Biederman #define ILL_PRVOPC	5	/* privileged opcode */
192cc731525SEric W. Biederman #define ILL_PRVREG	6	/* privileged register */
193cc731525SEric W. Biederman #define ILL_COPROC	7	/* coprocessor error */
194cc731525SEric W. Biederman #define ILL_BADSTK	8	/* internal stack error */
19571ee78d5SEric W. Biederman #ifdef __bfin__
19671ee78d5SEric W. Biederman # define ILL_CPLB_VI	9	/* D/I CPLB protect violation */
19771ee78d5SEric W. Biederman # define ILL_CPLB_MISS	10	/* D/I CPLB miss */
19871ee78d5SEric W. Biederman # define ILL_CPLB_MULHIT 11	/* D/I CPLB multiple hit */
19971ee78d5SEric W. Biederman #endif
200753e5a85SEric W. Biederman #ifdef __tile__
201753e5a85SEric W. Biederman # define ILL_DBLFLT	9	/* double fault */
202753e5a85SEric W. Biederman # define ILL_HARDWALL	10	/* user networks hardwall violation */
203753e5a85SEric W. Biederman #endif
204ac54058dSEric W. Biederman #ifdef __ia64__
205ac54058dSEric W. Biederman # define ILL_BADIADDR	9	/* unimplemented instruction address */
206ac54058dSEric W. Biederman # define __ILL_BREAK	10	/* illegal break */
207ac54058dSEric W. Biederman # define __ILL_BNDMOD	11	/* bundle-update (modification) in progress */
208ac54058dSEric W. Biederman #endif
209ac54058dSEric W. Biederman #define NSIGILL		11
2108a1ab315SDavid Howells 
2118a1ab315SDavid Howells /*
2128a1ab315SDavid Howells  * SIGFPE si_codes
2138a1ab315SDavid Howells  */
214cc731525SEric W. Biederman #define FPE_INTDIV	1	/* integer divide by zero */
215cc731525SEric W. Biederman #define FPE_INTOVF	2	/* integer overflow */
216cc731525SEric W. Biederman #define FPE_FLTDIV	3	/* floating point divide by zero */
217cc731525SEric W. Biederman #define FPE_FLTOVF	4	/* floating point overflow */
218cc731525SEric W. Biederman #define FPE_FLTUND	5	/* floating point underflow */
219cc731525SEric W. Biederman #define FPE_FLTRES	6	/* floating point inexact result */
220cc731525SEric W. Biederman #define FPE_FLTINV	7	/* floating point invalid operation */
221cc731525SEric W. Biederman #define FPE_FLTSUB	8	/* subscript out of range */
2228bc9e338SEric W. Biederman #ifdef __frv__
2238bc9e338SEric W. Biederman # define FPE_MDAOVF	9	/* media overflow */
2248bc9e338SEric W. Biederman #endif
225ac54058dSEric W. Biederman #ifdef __ia64__
226ac54058dSEric W. Biederman # define __FPE_DECOVF	9	/* decimal overflow */
227ac54058dSEric W. Biederman # define __FPE_DECDIV	10	/* decimal division by zero */
228ac54058dSEric W. Biederman # define __FPE_DECERR	11	/* packed decimal error */
229ac54058dSEric W. Biederman # define __FPE_INVASC	12	/* invalid ASCII digit */
230ac54058dSEric W. Biederman # define __FPE_INVDEC	13	/* invalid decimal digit */
231ac54058dSEric W. Biederman #endif
232266da65eSDave Martin #define FPE_FLTUNK	14	/* undiagnosed floating-point exception */
233266da65eSDave Martin #define NSIGFPE		14
2348a1ab315SDavid Howells 
2358a1ab315SDavid Howells /*
2368a1ab315SDavid Howells  * SIGSEGV si_codes
2378a1ab315SDavid Howells  */
238cc731525SEric W. Biederman #define SEGV_MAPERR	1	/* address not mapped to object */
239cc731525SEric W. Biederman #define SEGV_ACCERR	2	/* invalid permissions for mapped object */
24071ee78d5SEric W. Biederman #ifdef __bfin__
24171ee78d5SEric W. Biederman # define SEGV_STACKFLOW	3	/* stack overflow */
24271ee78d5SEric W. Biederman #else
243cc731525SEric W. Biederman # define SEGV_BNDERR	3	/* failed address bound checks */
24471ee78d5SEric W. Biederman #endif
245ac54058dSEric W. Biederman #ifdef __ia64__
246ac54058dSEric W. Biederman # define __SEGV_PSTKOVF	4	/* paragraph stack overflow */
247ac54058dSEric W. Biederman #else
248cc731525SEric W. Biederman # define SEGV_PKUERR	4	/* failed protection key checks */
249ac54058dSEric W. Biederman #endif
250cd0ea35fSDave Hansen #define NSIGSEGV	4
2518a1ab315SDavid Howells 
2528a1ab315SDavid Howells /*
2538a1ab315SDavid Howells  * SIGBUS si_codes
2548a1ab315SDavid Howells  */
255cc731525SEric W. Biederman #define BUS_ADRALN	1	/* invalid address alignment */
256cc731525SEric W. Biederman #define BUS_ADRERR	2	/* non-existent physical address */
257cc731525SEric W. Biederman #define BUS_OBJERR	3	/* object specific hardware error */
25871ee78d5SEric W. Biederman #ifdef __bfin__
25971ee78d5SEric W. Biederman # define BUS_OPFETCH	4	/* error from instruction fetch */
26071ee78d5SEric W. Biederman #else
2618a1ab315SDavid Howells /* hardware memory error consumed on a machine check: action required */
262cc731525SEric W. Biederman # define BUS_MCEERR_AR	4
26371ee78d5SEric W. Biederman #endif
2648a1ab315SDavid Howells /* hardware memory error detected in process but not consumed: action optional*/
265cc731525SEric W. Biederman #define BUS_MCEERR_AO	5
2668a1ab315SDavid Howells #define NSIGBUS		5
2678a1ab315SDavid Howells 
2688a1ab315SDavid Howells /*
2698a1ab315SDavid Howells  * SIGTRAP si_codes
2708a1ab315SDavid Howells  */
271cc731525SEric W. Biederman #define TRAP_BRKPT	1	/* process breakpoint */
272cc731525SEric W. Biederman #define TRAP_TRACE	2	/* process trace trap */
273cc731525SEric W. Biederman #define TRAP_BRANCH     3	/* process taken branch trap */
274cc731525SEric W. Biederman #define TRAP_HWBKPT     4	/* hardware breakpoint/watchpoint */
27571ee78d5SEric W. Biederman #ifdef __bfin__
27671ee78d5SEric W. Biederman # define TRAP_STEP	1	/* single-step breakpoint */
27771ee78d5SEric W. Biederman # define TRAP_TRACEFLOW	2	/* trace buffer overflow */
27871ee78d5SEric W. Biederman # define TRAP_WATCHPT	3	/* watchpoint match */
27971ee78d5SEric W. Biederman # define TRAP_ILLTRAP	4	/* illegal trap */
28071ee78d5SEric W. Biederman #endif
2818a1ab315SDavid Howells #define NSIGTRAP	4
2828a1ab315SDavid Howells 
2838a1ab315SDavid Howells /*
28463300eddSRandy Dunlap  * There is an additional set of SIGTRAP si_codes used by ptrace
28563300eddSRandy Dunlap  * that are of the form: ((PTRACE_EVENT_XXX << 8) | SIGTRAP)
286f9886bc5SEric W. Biederman  */
287f9886bc5SEric W. Biederman 
288f9886bc5SEric W. Biederman /*
2898a1ab315SDavid Howells  * SIGCHLD si_codes
2908a1ab315SDavid Howells  */
291cc731525SEric W. Biederman #define CLD_EXITED	1	/* child has exited */
292cc731525SEric W. Biederman #define CLD_KILLED	2	/* child was killed */
293cc731525SEric W. Biederman #define CLD_DUMPED	3	/* child terminated abnormally */
294cc731525SEric W. Biederman #define CLD_TRAPPED	4	/* traced child has trapped */
295cc731525SEric W. Biederman #define CLD_STOPPED	5	/* child has stopped */
296cc731525SEric W. Biederman #define CLD_CONTINUED	6	/* stopped child has continued */
2978a1ab315SDavid Howells #define NSIGCHLD	6
2988a1ab315SDavid Howells 
2998a1ab315SDavid Howells /*
300d08477aaSEric W. Biederman  * SIGPOLL (or any other signal without signal specific si_codes) si_codes
3018a1ab315SDavid Howells  */
302cc731525SEric W. Biederman #define POLL_IN		1	/* data input available */
303cc731525SEric W. Biederman #define POLL_OUT	2	/* output buffers available */
304cc731525SEric W. Biederman #define POLL_MSG	3	/* input message available */
305cc731525SEric W. Biederman #define POLL_ERR	4	/* i/o error */
306cc731525SEric W. Biederman #define POLL_PRI	5	/* high priority input available */
307cc731525SEric W. Biederman #define POLL_HUP	6	/* device disconnected */
3088a1ab315SDavid Howells #define NSIGPOLL	6
3098a1ab315SDavid Howells 
3108a1ab315SDavid Howells /*
3118a1ab315SDavid Howells  * SIGSYS si_codes
3128a1ab315SDavid Howells  */
313cc731525SEric W. Biederman #define SYS_SECCOMP	1	/* seccomp triggered */
3148a1ab315SDavid Howells #define NSIGSYS		1
3158a1ab315SDavid Howells 
3168a1ab315SDavid Howells /*
3178a1ab315SDavid Howells  * sigevent definitions
3188a1ab315SDavid Howells  *
3198a1ab315SDavid Howells  * It seems likely that SIGEV_THREAD will have to be handled from
3208a1ab315SDavid Howells  * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
3218a1ab315SDavid Howells  * thread manager then catches and does the appropriate nonsense.
3228a1ab315SDavid Howells  * However, everything is written out here so as to not get lost.
3238a1ab315SDavid Howells  */
3248a1ab315SDavid Howells #define SIGEV_SIGNAL	0	/* notify via signal */
3258a1ab315SDavid Howells #define SIGEV_NONE	1	/* other notification: meaningless */
3268a1ab315SDavid Howells #define SIGEV_THREAD	2	/* deliver via thread creation */
3278a1ab315SDavid Howells #define SIGEV_THREAD_ID 4	/* deliver to thread */
3288a1ab315SDavid Howells 
3298a1ab315SDavid Howells /*
3308a1ab315SDavid Howells  * This works because the alignment is ok on all current architectures
3318a1ab315SDavid Howells  * but we leave open this being overridden in the future
3328a1ab315SDavid Howells  */
3338a1ab315SDavid Howells #ifndef __ARCH_SIGEV_PREAMBLE_SIZE
3348a1ab315SDavid Howells #define __ARCH_SIGEV_PREAMBLE_SIZE	(sizeof(int) * 2 + sizeof(sigval_t))
3358a1ab315SDavid Howells #endif
3368a1ab315SDavid Howells 
3378a1ab315SDavid Howells #define SIGEV_MAX_SIZE	64
3388a1ab315SDavid Howells #define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
3398a1ab315SDavid Howells 		/ sizeof(int))
3408a1ab315SDavid Howells 
3418a1ab315SDavid Howells typedef struct sigevent {
3428a1ab315SDavid Howells 	sigval_t sigev_value;
3438a1ab315SDavid Howells 	int sigev_signo;
3448a1ab315SDavid Howells 	int sigev_notify;
3458a1ab315SDavid Howells 	union {
3468a1ab315SDavid Howells 		int _pad[SIGEV_PAD_SIZE];
3478a1ab315SDavid Howells 		 int _tid;
3488a1ab315SDavid Howells 
3498a1ab315SDavid Howells 		struct {
3508a1ab315SDavid Howells 			void (*_function)(sigval_t);
3518a1ab315SDavid Howells 			void *_attribute;	/* really pthread_attr_t */
3528a1ab315SDavid Howells 		} _sigev_thread;
3538a1ab315SDavid Howells 	} _sigev_un;
3548a1ab315SDavid Howells } sigevent_t;
3558a1ab315SDavid Howells 
3568a1ab315SDavid Howells #define sigev_notify_function	_sigev_un._sigev_thread._function
3578a1ab315SDavid Howells #define sigev_notify_attributes	_sigev_un._sigev_thread._attribute
3588a1ab315SDavid Howells #define sigev_notify_thread_id	 _sigev_un._tid
3598a1ab315SDavid Howells 
3608a1ab315SDavid Howells 
3618a1ab315SDavid Howells #endif /* _UAPI_ASM_GENERIC_SIGINFO_H */
362