xref: /qemu/linux-user/mips/target_signal.h (revision 8949bef18b9f8731d8aa99d2e5fcf03d52f11412)
19c93ae13SMarkus Armbruster #ifndef MIPS_TARGET_SIGNAL_H
29c93ae13SMarkus Armbruster #define MIPS_TARGET_SIGNAL_H
3a04e134aSths 
4a04e134aSths #include "cpu.h"
5a04e134aSths 
6a04e134aSths /* this struct defines a stack used during syscall handling */
7a04e134aSths 
8a04e134aSths typedef struct target_sigaltstack {
9992f48a0Sblueswir1 	abi_long ss_sp;
10992f48a0Sblueswir1 	abi_ulong ss_size;
11992f48a0Sblueswir1 	abi_long ss_flags;
12c227f099SAnthony Liguori } target_stack_t;
13a04e134aSths 
14a04e134aSths 
15a04e134aSths /*
16a04e134aSths  * sigaltstack controls
17a04e134aSths  */
18a04e134aSths #define TARGET_SS_ONSTACK     1
19a04e134aSths #define TARGET_SS_DISABLE     2
20a04e134aSths 
21a04e134aSths #define TARGET_MINSIGSTKSZ    2048
22a04e134aSths #define TARGET_SIGSTKSZ       8192
23a04e134aSths 
24992f48a0Sblueswir1 static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state)
25198a74deSths {
26b5dc7732Sths     return state->active_tc.gpr[29];
27198a74deSths }
28198a74deSths 
29*8949bef1SLaurent Vivier # if defined(TARGET_ABI_MIPSO32)
30*8949bef1SLaurent Vivier /* compare linux/arch/mips/kernel/signal.c:setup_frame() */
31*8949bef1SLaurent Vivier void setup_frame(int sig, struct target_sigaction * ka,
32*8949bef1SLaurent Vivier                  target_sigset_t *set, CPUMIPSState *regs);
33*8949bef1SLaurent Vivier #endif
34*8949bef1SLaurent Vivier void setup_rt_frame(int sig, struct target_sigaction *ka,
35*8949bef1SLaurent Vivier                     target_siginfo_t *info,
36*8949bef1SLaurent Vivier                     target_sigset_t *set, CPUMIPSState *env);
379c93ae13SMarkus Armbruster #endif /* MIPS_TARGET_SIGNAL_H */
38