]> git.proxmox.com Git - mirror_qemu.git/blame - bsd-user/i386/target_arch_signal.h
bsd-user: create a per-arch signal.c file
[mirror_qemu.git] / bsd-user / i386 / target_arch_signal.h
CommitLineData
790baacc
WL
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
790baacc
WL
30struct target_sigcontext {
31 /* to be added */
32};
33
34typedef struct target_mcontext {
35} target_mcontext_t;
36
37typedef struct target_ucontext {
38 target_sigset_t uc_sigmask;
39 target_mcontext_t uc_mcontext;
40 abi_ulong uc_link;
41 target_stack_t uc_stack;
42 int32_t uc_flags;
43 int32_t __spare__[4];
44} target_ucontext_t;
45
46struct target_sigframe {
47 abi_ulong sf_signum;
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];
54};
55
56/*
57 * Compare to i386/i386/machdep.c sendsig()
58 * Assumes that target stack frame memory is locked.
59 */
60static inline abi_long set_sigtramp_args(CPUX86State *regs,
61 int sig, struct target_sigframe *frame, abi_ulong frame_addr,
62 struct target_sigaction *ka)
63{
64 /* XXX return -TARGET_EOPNOTSUPP; */
65 return 0;
66}
67
68/* Compare to i386/i386/machdep.c get_mcontext() */
69static inline abi_long get_mcontext(CPUX86State *regs,
70 target_mcontext_t *mcp, int flags)
71{
72 /* XXX */
73 return -TARGET_EOPNOTSUPP;
74}
75
76/* Compare to i386/i386/machdep.c set_mcontext() */
77static inline abi_long set_mcontext(CPUX86State *regs,
78 target_mcontext_t *mcp, int srflag)
79{
80 /* XXX */
81 return -TARGET_EOPNOTSUPP;
82}
83
84static inline abi_long get_ucontext_sigreturn(CPUX86State *regs,
85 abi_ulong target_sf, abi_ulong *target_uc)
86{
87 /* XXX */
88 *target_uc = 0;
89 return -TARGET_EOPNOTSUPP;
90}
91
92#endif /* TARGET_ARCH_SIGNAL_H */