xref: /qemu/linux-user/i386/target_signal.h (revision a075f313c57f1d5f06aa344429747f98434f2962)
1 #ifndef I386_TARGET_SIGNAL_H
2 #define I386_TARGET_SIGNAL_H
3 
4 #include "cpu.h"
5 
6 /* this struct defines a stack used during syscall handling */
7 
8 typedef struct target_sigaltstack {
9 	abi_ulong ss_sp;
10 	abi_long ss_flags;
11 	abi_ulong ss_size;
12 } target_stack_t;
13 
14 
15 /*
16  * sigaltstack controls
17  */
18 #define TARGET_SS_ONSTACK	1
19 #define TARGET_SS_DISABLE	2
20 
21 #define TARGET_MINSIGSTKSZ	2048
22 #define TARGET_SIGSTKSZ		8192
23 
24 static inline abi_ulong get_sp_from_cpustate(CPUX86State *state)
25 {
26     return state->regs[R_ESP];
27 }
28 
29 void setup_frame(int sig, struct target_sigaction *ka,
30                  target_sigset_t *set, CPUX86State *env);
31 void setup_rt_frame(int sig, struct target_sigaction *ka,
32                     target_siginfo_t *info,
33                     target_sigset_t *set, CPUX86State *env);
34 #endif /* I386_TARGET_SIGNAL_H */
35