xref: /aosp_15_r20/external/musl/arch/or1k/bits/signal.h (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3 
4 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
5 #define MINSIGSTKSZ 2048
6 #define SIGSTKSZ 8192
7 #endif
8 
9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
10 typedef unsigned long greg_t, gregset_t[34];
11 typedef struct sigcontext {
12 	struct {
13 		unsigned long gpr[32];
14 		unsigned long pc;
15 		unsigned long sr;
16 	} regs;
17 	unsigned long oldmask;
18 } mcontext_t;
19 #else
20 typedef struct {
21 	unsigned long __regs[35];
22 } mcontext_t;
23 #endif
24 
25 struct sigaltstack {
26 	void *ss_sp;
27 	int ss_flags;
28 	size_t ss_size;
29 };
30 
31 typedef struct __ucontext {
32 	unsigned long uc_flags;
33 	struct __ucontext *uc_link;
34 	stack_t uc_stack;
35 	mcontext_t uc_mcontext;
36 	sigset_t uc_sigmask;
37 } ucontext_t;
38 
39 #define SA_NOCLDSTOP  1
40 #define SA_NOCLDWAIT  2
41 #define SA_SIGINFO    4
42 #define SA_ONSTACK    0x08000000
43 #define SA_RESTART    0x10000000
44 #define SA_NODEFER    0x40000000
45 #define SA_RESETHAND  0x80000000
46 
47 #endif
48 
49 #define SIGHUP    1
50 #define SIGINT    2
51 #define SIGQUIT   3
52 #define SIGILL    4
53 #define SIGTRAP   5
54 #define SIGABRT   6
55 #define SIGIOT    SIGABRT
56 #define SIGBUS    7
57 #define SIGFPE    8
58 #define SIGKILL   9
59 #define SIGUSR1   10
60 #define SIGSEGV   11
61 #define SIGUSR2   12
62 #define SIGPIPE   13
63 #define SIGALRM   14
64 #define SIGTERM   15
65 #define SIGSTKFLT 16
66 #define SIGCHLD   17
67 #define SIGCONT   18
68 #define SIGSTOP   19
69 #define SIGTSTP   20
70 #define SIGTTIN   21
71 #define SIGTTOU   22
72 #define SIGURG    23
73 #define SIGXCPU   24
74 #define SIGXFSZ   25
75 #define SIGVTALRM 26
76 #define SIGPROF   27
77 #define SIGWINCH  28
78 #define SIGIO     29
79 #define SIGPOLL   29
80 #define SIGPWR    30
81 #define SIGSYS    31
82 #define SIGUNUSED SIGSYS
83 
84 #define _NSIG 65
85