]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
e6d930b4 IM |
2 | #ifndef _LINUX_SIGNAL_TYPES_H |
3 | #define _LINUX_SIGNAL_TYPES_H | |
4 | ||
76960dbf IM |
5 | /* |
6 | * Basic signal handling related data type definitions: | |
7 | */ | |
8 | ||
e6d930b4 IM |
9 | #include <linux/list.h> |
10 | #include <uapi/linux/signal.h> | |
11 | ||
ae7795bc | 12 | typedef struct kernel_siginfo { |
4ce5f9c9 | 13 | __SIGINFO; |
ae7795bc EB |
14 | } kernel_siginfo_t; |
15 | ||
76960dbf IM |
16 | /* |
17 | * Real Time signals may be queued. | |
18 | */ | |
19 | ||
20 | struct sigqueue { | |
21 | struct list_head list; | |
22 | int flags; | |
ae7795bc | 23 | kernel_siginfo_t info; |
76960dbf IM |
24 | struct user_struct *user; |
25 | }; | |
26 | ||
27 | /* flags values. */ | |
28 | #define SIGQUEUE_PREALLOC 1 | |
29 | ||
30 | struct sigpending { | |
31 | struct list_head list; | |
32 | sigset_t signal; | |
33 | }; | |
34 | ||
35 | struct sigaction { | |
36 | #ifndef __ARCH_HAS_IRIX_SIGACTION | |
37 | __sighandler_t sa_handler; | |
38 | unsigned long sa_flags; | |
39 | #else | |
40 | unsigned int sa_flags; | |
41 | __sighandler_t sa_handler; | |
42 | #endif | |
43 | #ifdef __ARCH_HAS_SA_RESTORER | |
44 | __sigrestore_t sa_restorer; | |
45 | #endif | |
46 | sigset_t sa_mask; /* mask last for extensibility */ | |
47 | }; | |
48 | ||
49 | struct k_sigaction { | |
50 | struct sigaction sa; | |
51 | #ifdef __ARCH_HAS_KA_RESTORER | |
52 | __sigrestore_t ka_restorer; | |
53 | #endif | |
54 | }; | |
55 | ||
56 | #ifdef CONFIG_OLD_SIGACTION | |
57 | struct old_sigaction { | |
58 | __sighandler_t sa_handler; | |
59 | old_sigset_t sa_mask; | |
60 | unsigned long sa_flags; | |
61 | __sigrestore_t sa_restorer; | |
62 | }; | |
63 | #endif | |
64 | ||
65 | struct ksignal { | |
66 | struct k_sigaction ka; | |
ae7795bc | 67 | kernel_siginfo_t info; |
76960dbf IM |
68 | int sig; |
69 | }; | |
70 | ||
23acdc76 PC |
71 | #ifndef __ARCH_UAPI_SA_FLAGS |
72 | #ifdef SA_RESTORER | |
73 | #define __ARCH_UAPI_SA_FLAGS SA_RESTORER | |
74 | #else | |
75 | #define __ARCH_UAPI_SA_FLAGS 0 | |
76 | #endif | |
77 | #endif | |
78 | ||
79 | #define UAPI_SA_FLAGS \ | |
80 | (SA_NOCLDSTOP | SA_NOCLDWAIT | SA_SIGINFO | SA_ONSTACK | SA_RESTART | \ | |
6ac05e83 | 81 | SA_NODEFER | SA_RESETHAND | SA_EXPOSE_TAGBITS | __ARCH_UAPI_SA_FLAGS) |
23acdc76 | 82 | |
e6d930b4 | 83 | #endif /* _LINUX_SIGNAL_TYPES_H */ |