xref: /qemu/linux-user/sh4/target_signal.h (revision c227f0995e1722a1abccc28cadf0664266bd8043)
1a04e134aSths #ifndef TARGET_SIGNAL_H
2a04e134aSths #define 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_ulong ss_sp;
10992f48a0Sblueswir1 	abi_long ss_flags;
11992f48a0Sblueswir1 	abi_ulong ss_size;
12*c227f099SAnthony 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 
24c3b5bc8aSths static inline abi_ulong get_sp_from_cpustate(CPUSH4State *state)
25c3b5bc8aSths {
26c3b5bc8aSths     return state->gregs[15];
27c3b5bc8aSths }
28c3b5bc8aSths 
29a04e134aSths #endif /* TARGET_SIGNAL_H */
30