aarch64: add struct _aarch64_ctx to signal.h
[musl] / arch / aarch64 / bits / signal.h
1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3
4 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
5 typedef unsigned long greg_t;
6 typedef unsigned long gregset_t[34];
7
8 typedef struct {
9         long double vregs[32];
10         unsigned int fpsr;
11         unsigned int fpcr;
12 } fpregset_t;
13 typedef struct sigcontext
14 {
15         unsigned long fault_address;
16         unsigned long regs[31];
17         unsigned long sp, pc, pstate;
18         long double __reserved[256];
19 } mcontext_t;
20
21 #define FPSIMD_MAGIC 0x46508001
22 #define ESR_MAGIC 0x45535201
23 struct _aarch64_ctx {
24         unsigned int magic;
25         unsigned int size;
26 };
27 struct fpsimd_context {
28         struct _aarch64_ctx head;
29         unsigned int fpsr;
30         unsigned int fpcr;
31         long double vregs[32];
32 };
33 struct esr_context {
34         struct _aarch64_ctx head;
35         unsigned long esr;
36 };
37 #else
38 typedef struct {
39         long double __regs[18+256];
40 } mcontext_t;
41 #endif
42
43 struct sigaltstack {
44         void *ss_sp;
45         int ss_flags;
46         size_t ss_size;
47 };
48
49 typedef struct __ucontext {
50         unsigned long uc_flags;
51         struct ucontext *uc_link;
52         stack_t uc_stack;
53         sigset_t uc_sigmask;
54         mcontext_t uc_mcontext;
55 } ucontext_t;
56
57 #define SA_NOCLDSTOP  1
58 #define SA_NOCLDWAIT  2
59 #define SA_SIGINFO    4
60 #define SA_ONSTACK    0x08000000
61 #define SA_RESTART    0x10000000
62 #define SA_NODEFER    0x40000000
63 #define SA_RESETHAND  0x80000000
64 #define SA_RESTORER   0x04000000
65
66 #endif
67
68 #define SIGHUP    1
69 #define SIGINT    2
70 #define SIGQUIT   3
71 #define SIGILL    4
72 #define SIGTRAP   5
73 #define SIGABRT   6
74 #define SIGIOT    SIGABRT
75 #define SIGBUS    7
76 #define SIGFPE    8
77 #define SIGKILL   9
78 #define SIGUSR1   10
79 #define SIGSEGV   11
80 #define SIGUSR2   12
81 #define SIGPIPE   13
82 #define SIGALRM   14
83 #define SIGTERM   15
84 #define SIGSTKFLT 16
85 #define SIGCHLD   17
86 #define SIGCONT   18
87 #define SIGSTOP   19
88 #define SIGTSTP   20
89 #define SIGTTIN   21
90 #define SIGTTOU   22
91 #define SIGURG    23
92 #define SIGXCPU   24
93 #define SIGXFSZ   25
94 #define SIGVTALRM 26
95 #define SIGPROF   27
96 #define SIGWINCH  28
97 #define SIGIO     29
98 #define SIGPOLL   29
99 #define SIGPWR    30
100 #define SIGSYS    31
101 #define SIGUNUSED SIGSYS
102
103 #define _NSIG 65