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