1 #ifndef _I386_SIGNAL_H_
2 #define _I386_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>
14 #include <machine/fpu.h>
16 typedef struct stackframe_s sigregs
;
17 struct sigframe
{ /* stack frame created for signalled process */
18 void (*sf_retadr
)(void);
21 struct sigcontext
*sf_scp
;
23 void (*sf_retadr2
)(void);
24 struct sigcontext
*sf_scpcopy
;
28 int trap_style
; /* how should context be restored? KTS_* */
29 int sc_flags
; /* sigstack state to restore (including
32 long sc_mask
; /* signal mask to restore */
33 sigregs sc_regs
; /* register set to restore */
34 union fpu_state_u sc_fpu_state
;
37 #define sc_gs sc_regs.gs
38 #define sc_fs sc_regs.fs
39 #define sc_es sc_regs.es
40 #define sc_ds sc_regs.ds
41 #define sc_di sc_regs.di
42 #define sc_si sc_regs.si
43 #define sc_fp sc_regs.bp
44 #define sc_st sc_regs.st /* stack top -- used in kernel */
45 #define sc_bx sc_regs.bx
46 #define sc_dx sc_regs.dx
47 #define sc_cx sc_regs.cx
48 #define sc_retreg sc_regs.retreg
49 #define sc_retadr sc_regs.retadr /* return address to caller of
50 save -- used in kernel */
51 #define sc_pc sc_regs.pc
52 #define sc_cs sc_regs.cs
53 #define sc_psw sc_regs.psw
54 #define sc_sp sc_regs.sp
55 #define sc_ss sc_regs.ss
59 int sigreturn(struct sigcontext
*_scp
);
63 #endif /* !_I386_SIGNAL_H_ */