arm: protect state after signal handler
[minix.git] / sys / arch / arm / include / signal.h
blobf4d6d4f632e6f33d0925c6344dabc989e2544e8d
1 #ifndef _ARM_SIGNAL_H_
2 #define _ARM_SIGNAL_H_
4 #include <sys/featuretest.h>
6 typedef int sig_atomic_t;
8 /* The following structure should match the stackframe_s structure used
9 * by the kernel's context switching code. Floating point registers should
10 * be added in a different struct.
13 #include <machine/stackframe.h>
15 typedef struct stackframe_s sigregs;
16 struct sigframe { /* stack frame created for signalled process */
17 void (*sf_retadr)(void);
18 int sf_signo;
19 int sf_code;
20 struct sigcontext *sf_scp;
21 int sf_fp;
22 void (*sf_retadr2)(void);
23 struct sigcontext *sf_scpcopy;
26 struct sigcontext {
27 int trap_style; /* how should context be restored? KTS_* */
28 int sc_flags; /* sigstack state to restore (including
29 * MF_FPU_INITIALIZED)
31 long sc_mask; /* signal mask to restore */
32 sigregs sc_regs; /* register set to restore */
35 #define sc_retreg sc_regs.retreg
36 #define sc_r1 sc_regs.r1
37 #define sc_r2 sc_regs.r2
38 #define sc_r3 sc_regs.r3
39 #define sc_r4 sc_regs.r4
40 #define sc_r5 sc_regs.r5
41 #define sc_r6 sc_regs.r6
42 #define sc_r7 sc_regs.r7
43 #define sc_r8 sc_regs.r8
44 #define sc_r9 sc_regs.r9
45 #define sc_r10 sc_regs.r10
46 #define sc_fp sc_regs.fp
47 #define sc_r12 sc_regs.r12
48 #define sc_sp sc_regs.sp
49 #define sc_lr sc_regs.lr
50 #define sc_pc sc_regs.pc
51 #define sc_psr sc_regs.psr
53 #ifdef _MINIX
54 __BEGIN_DECLS
55 int sigreturn(struct sigcontext *_scp);
56 __END_DECLS
57 #endif /* _MINIX */
59 #endif /* !_ARM_SIGNAL_H_ */