2 * i386 dependent 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 struct target_sigcontext
{
34 typedef struct target_mcontext
{
37 typedef struct target_ucontext
{
38 target_sigset_t uc_sigmask
;
39 target_mcontext_t uc_mcontext
;
41 target_stack_t uc_stack
;
46 struct target_sigframe
{
48 abi_ulong sf_siginfo
; /* code or pointer to sf_si */
49 abi_ulong sf_ucontext
; /* points to sf_uc */
50 abi_ulong sf_addr
; /* undocumented 4th arg */
51 target_ucontext_t sf_uc
; /* = *sf_uncontext */
52 target_siginfo_t sf_si
; /* = *sf_siginfo (SA_SIGINFO case)*/
53 uint32_t __spare__
[2];
57 * Compare to i386/i386/machdep.c sendsig()
58 * Assumes that target stack frame memory is locked.
60 static inline abi_long
set_sigtramp_args(CPUX86State
*regs
,
61 int sig
, struct target_sigframe
*frame
, abi_ulong frame_addr
,
62 struct target_sigaction
*ka
)
64 /* XXX return -TARGET_EOPNOTSUPP; */
68 /* Compare to i386/i386/machdep.c get_mcontext() */
69 static inline abi_long
get_mcontext(CPUX86State
*regs
,
70 target_mcontext_t
*mcp
, int flags
)
73 return -TARGET_EOPNOTSUPP
;
76 /* Compare to i386/i386/machdep.c set_mcontext() */
77 static inline abi_long
set_mcontext(CPUX86State
*regs
,
78 target_mcontext_t
*mcp
, int srflag
)
81 return -TARGET_EOPNOTSUPP
;
84 static inline abi_long
get_ucontext_sigreturn(CPUX86State
*regs
,
85 abi_ulong target_sf
, abi_ulong
*target_uc
)
89 return -TARGET_EOPNOTSUPP
;
92 #endif /* TARGET_ARCH_SIGNAL_H */