2 * x86_64 signal definitions
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef _TARGET_ARCH_SIGNAL_H_
19 #define _TARGET_ARCH_SIGNAL_H_
23 /* Size of the signal trampolin code placed on the stack. */
24 #define TARGET_SZSIGCODE 0
26 /* compare to x86/include/_limits.h */
27 #define TARGET_MINSIGSTKSZ (512 * 4) /* min sig stack size */
28 #define TARGET_SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended size */
30 #define TARGET_MC_GET_CLEAR_RET 0x0001
32 struct target_sigcontext
{
36 typedef struct target_mcontext
{
39 typedef struct target_ucontext
{
40 target_sigset_t uc_sigmask
;
41 target_mcontext_t uc_mcontext
;
43 target_stack_t uc_stack
;
48 struct target_sigframe
{
50 abi_ulong sf_siginfo
; /* code or pointer to sf_si */
51 abi_ulong sf_ucontext
; /* points to sf_uc */
52 abi_ulong sf_addr
; /* undocumented 4th arg */
53 target_ucontext_t sf_uc
; /* = *sf_uncontext */
54 target_siginfo_t sf_si
; /* = *sf_siginfo (SA_SIGINFO case)*/
55 uint32_t __spare__
[2];
59 * Compare to amd64/amd64/machdep.c sendsig()
60 * Assumes that target stack frame memory is locked.
62 static inline abi_long
set_sigtramp_args(CPUX86State
*regs
,
63 int sig
, struct target_sigframe
*frame
, abi_ulong frame_addr
,
64 struct target_sigaction
*ka
)
66 /* XXX return -TARGET_EOPNOTSUPP; */
70 /* Compare to amd64/amd64/machdep.c get_mcontext() */
71 static inline abi_long
get_mcontext(CPUX86State
*regs
,
72 target_mcontext_t
*mcp
, int flags
)
75 return -TARGET_EOPNOTSUPP
;
78 /* Compare to amd64/amd64/machdep.c set_mcontext() */
79 static inline abi_long
set_mcontext(CPUX86State
*regs
,
80 target_mcontext_t
*mcp
, int srflag
)
83 return -TARGET_EOPNOTSUPP
;
86 static inline abi_long
get_ucontext_sigreturn(CPUX86State
*regs
,
87 abi_ulong target_sf
, abi_ulong
*target_uc
)
91 return -TARGET_EOPNOTSUPP
;
94 #endif /* !TARGET_ARCH_SIGNAL_H_ */