1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /*
3  *  include/linux/signalfd.h
4  *
5  *  Copyright (C) 2007  Davide Libenzi <davidel@xmailserver.org>
6  *
7  */
8 
9 #ifndef _UAPI_LINUX_SIGNALFD_H
10 #define _UAPI_LINUX_SIGNALFD_H
11 
12 #include <linux/types.h>
13 /* For O_CLOEXEC and O_NONBLOCK */
14 #include <linux/fcntl.h>
15 
16 /* Flags for signalfd4.  */
17 #define SFD_CLOEXEC O_CLOEXEC
18 #define SFD_NONBLOCK O_NONBLOCK
19 
20 struct signalfd_siginfo {
21 	uint32_t ssi_signo;
22 	int32_t ssi_errno;
23 	int32_t ssi_code;
24 	uint32_t ssi_pid;
25 	uint32_t ssi_uid;
26 	int32_t ssi_fd;
27 	uint32_t ssi_tid;
28 	uint32_t ssi_band;
29 	uint32_t ssi_overrun;
30 	uint32_t ssi_trapno;
31 	int32_t ssi_status;
32 	int32_t ssi_int;
33 	uint64_t ssi_ptr;
34 	uint64_t ssi_utime;
35 	uint64_t ssi_stime;
36 	uint64_t ssi_addr;
37 	uint16_t ssi_addr_lsb;
38 	uint16_t __pad2;
39 	int32_t ssi_syscall;
40 	uint64_t ssi_call_addr;
41 	uint32_t ssi_arch;
42 	uint32_t __pad3;
43 	uint64_t ssi_perf;
44 
45 	/*
46 	 * Pad strcture to 128 bytes. Remember to update the
47 	 * pad size when you add new members. We use a fixed
48 	 * size structure to avoid compatibility problems with
49 	 * future versions, and we leave extra space for additional
50 	 * members. We use fixed size members because this strcture
51 	 * comes out of a read(2) and we really don't want to have
52 	 * a compat on read(2).
53 	 */
54 	uint8_t __pad[16];
55 };
56 
57 
58 
59 #endif /* _UAPI_LINUX_SIGNALFD_H */
60