]> git.proxmox.com Git - mirror_qemu.git/blob - bsd-user/i386/target_arch_signal.h
bsd-user/i386/target_arch_signal.h: use new target_os_ucontext.h
[mirror_qemu.git] / bsd-user / i386 / target_arch_signal.h
1 /*
2 * i386 dependent signal definitions
3 *
4 *
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.
9 *
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.
14 *
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/>.
17 */
18 #ifndef TARGET_ARCH_SIGNAL_H
19 #define TARGET_ARCH_SIGNAL_H
20
21 #include "cpu.h"
22
23 /* Size of the signal trampolin code placed on the stack. */
24 #define TARGET_SZSIGCODE 0
25
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 */
29
30 typedef struct target_mcontext {
31 } target_mcontext_t;
32
33 #include "target_os_ucontext.h"
34
35 struct target_sigframe {
36 abi_ulong sf_signum;
37 abi_ulong sf_siginfo; /* code or pointer to sf_si */
38 abi_ulong sf_ucontext; /* points to sf_uc */
39 abi_ulong sf_addr; /* undocumented 4th arg */
40 target_ucontext_t sf_uc; /* = *sf_uncontext */
41 target_siginfo_t sf_si; /* = *sf_siginfo (SA_SIGINFO case)*/
42 uint32_t __spare__[2];
43 };
44
45 /*
46 * Compare to i386/i386/machdep.c sendsig()
47 * Assumes that target stack frame memory is locked.
48 */
49 static inline abi_long set_sigtramp_args(CPUX86State *regs,
50 int sig, struct target_sigframe *frame, abi_ulong frame_addr,
51 struct target_sigaction *ka)
52 {
53 /* XXX return -TARGET_EOPNOTSUPP; */
54 return 0;
55 }
56
57 /* Compare to i386/i386/machdep.c get_mcontext() */
58 static inline abi_long get_mcontext(CPUX86State *regs,
59 target_mcontext_t *mcp, int flags)
60 {
61 /* XXX */
62 return -TARGET_EOPNOTSUPP;
63 }
64
65 /* Compare to i386/i386/machdep.c set_mcontext() */
66 static inline abi_long set_mcontext(CPUX86State *regs,
67 target_mcontext_t *mcp, int srflag)
68 {
69 /* XXX */
70 return -TARGET_EOPNOTSUPP;
71 }
72
73 static inline abi_long get_ucontext_sigreturn(CPUX86State *regs,
74 abi_ulong target_sf, abi_ulong *target_uc)
75 {
76 /* XXX */
77 *target_uc = 0;
78 return -TARGET_EOPNOTSUPP;
79 }
80
81 #endif /* TARGET_ARCH_SIGNAL_H */