use struct pt_regs * rather than void * for powerpc[64] sigcontext regs
[musl.git] / arch / powerpc64 / bits / signal.h
blobd5493b185623413bd71622f6cfb470724d25ff4e
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 10240
7 #endif
9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
11 typedef unsigned long greg_t, gregset_t[48];
12 typedef double fpregset_t[33];
14 typedef struct {
15 #ifdef __GNUC__
16 __attribute__((__aligned__(16)))
17 #endif
18 unsigned vrregs[32][4];
19 struct {
20 #if __BIG_ENDIAN__
21 unsigned _pad[3], vscr_word;
22 #else
23 unsigned vscr_word, _pad[3];
24 #endif
25 } vscr;
26 unsigned vrsave, _pad[3];
27 } vrregset_t;
29 typedef struct sigcontext {
30 unsigned long _unused[4];
31 int signal;
32 int _pad0;
33 unsigned long handler;
34 unsigned long oldmask;
35 struct pt_regs *regs;
36 gregset_t gp_regs;
37 fpregset_t fp_regs;
38 vrregset_t *v_regs;
39 long vmx_reserve[34+34+32+1];
40 } mcontext_t;
42 #else
44 typedef struct {
45 long __regs[4+4+48+33+1+34+34+32+1];
46 } mcontext_t;
48 #endif
50 struct sigaltstack {
51 void *ss_sp;
52 int ss_flags;
53 size_t ss_size;
56 typedef struct __ucontext {
57 unsigned long uc_flags;
58 struct __ucontext *uc_link;
59 stack_t uc_stack;
60 sigset_t uc_sigmask;
61 mcontext_t uc_mcontext;
62 } ucontext_t;
64 #define SA_NOCLDSTOP 1U
65 #define SA_NOCLDWAIT 2U
66 #define SA_SIGINFO 4U
67 #define SA_ONSTACK 0x08000000U
68 #define SA_RESTART 0x10000000U
69 #define SA_NODEFER 0x40000000U
70 #define SA_RESETHAND 0x80000000U
71 #define SA_RESTORER 0x04000000U
73 #endif
75 #define SIGHUP 1
76 #define SIGINT 2
77 #define SIGQUIT 3
78 #define SIGILL 4
79 #define SIGTRAP 5
80 #define SIGABRT 6
81 #define SIGIOT SIGABRT
82 #define SIGBUS 7
83 #define SIGFPE 8
84 #define SIGKILL 9
85 #define SIGUSR1 10
86 #define SIGSEGV 11
87 #define SIGUSR2 12
88 #define SIGPIPE 13
89 #define SIGALRM 14
90 #define SIGTERM 15
91 #define SIGSTKFLT 16
92 #define SIGCHLD 17
93 #define SIGCONT 18
94 #define SIGSTOP 19
95 #define SIGTSTP 20
96 #define SIGTTIN 21
97 #define SIGTTOU 22
98 #define SIGURG 23
99 #define SIGXCPU 24
100 #define SIGXFSZ 25
101 #define SIGVTALRM 26
102 #define SIGPROF 27
103 #define SIGWINCH 28
104 #define SIGIO 29
105 #define SIGPOLL SIGIO
106 #define SIGPWR 30
107 #define SIGSYS 31
108 #define SIGUNUSED SIGSYS
110 #define _NSIG 65