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