sigcontext/mcontext cleanup for arch-specific bits
[musl] / arch / mips / 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 struct sigcontext
6 {
7         unsigned sc_regmask, sc_status;
8         unsigned long long sc_pc, sc_regs[32], sc_fpregs[32];
9         unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
10         unsigned long long sc_mdhi, sc_mdlo;
11         unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
12 } mcontext_t;
13 #else
14 typedef struct {
15         unsigned __mc1[2];
16         unsigned long long __mc2[65];
17         unsigned __mc3[5];
18         unsigned long long __mc4[2];
19         unsigned __mc5[6];
20 } mcontext_t;
21 #endif
22
23 typedef struct __ucontext {
24         unsigned long uc_flags;
25         struct __ucontext *uc_link;
26         stack_t uc_stack;
27         mcontext_t uc_mcontext;
28         sigset_t uc_sigmask;
29         unsigned long uc_regspace[128];
30 } ucontext_t;
31
32 #define SA_NOCLDSTOP  1
33 #define SA_NOCLDWAIT  0x10000
34 #define SA_SIGINFO    8
35 #define SA_ONSTACK    0x08000000
36 #define SA_RESTART    0x10000000
37 #define SA_NODEFER    0x40000000
38 #define SA_RESETHAND  0x80000000
39 #define SA_RESTORER   0x04000000
40
41 #undef SIG_BLOCK
42 #undef SIG_UNBLOCK
43 #undef SIG_SETMASK
44 #define SIG_BLOCK     1
45 #define SIG_UNBLOCK   2
46 #define SIG_SETMASK   3
47
48 #endif
49
50 #define SIGHUP    1
51 #define SIGINT    2
52 #define SIGQUIT   3
53 #define SIGILL    4
54 #define SIGTRAP   5
55 #define SIGABRT   6
56 #define SIGIOT    SIGABRT
57 #define SIGSTKFLT 7
58 #define SIGFPE    8
59 #define SIGKILL   9
60 #define SIGBUS    10
61 #define SIGSEGV   11
62 #define SIGSYS    12
63 #define SIGPIPE   13
64 #define SIGALRM   14
65 #define SIGTERM   15
66 #define SIGUSR1   16
67 #define SIGUSR2   17
68 #define SIGCHLD   18
69 #define SIGPWR    19
70 #define SIGWINCH  20
71 #define SIGURG    21
72 #define SIGIO     22
73 #define SIGPOLL   SIGIO
74 #define SIGSTOP   23
75 #define SIGTSTP   24
76 #define SIGCONT   25
77 #define SIGTTIN   26
78 #define SIGTTOU   27
79 #define SIGVTALRM 28
80 #define SIGPROF   29
81 #define SIGXCPU   30
82 #define SIGXFSZ   31
83 #define SIGUNUSED SIGSYS
84
85 #define _NSIG 129