1 /* 2 * x86_64 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 typedef struct target_ucontext { 34 target_sigset_t uc_sigmask; 35 target_mcontext_t uc_mcontext; 36 abi_ulong uc_link; 37 target_stack_t uc_stack; 38 int32_t uc_flags; 39 int32_t __spare__[4]; 40 } target_ucontext_t; 41 42 struct target_sigframe { 43 abi_ulong sf_signum; 44 abi_ulong sf_siginfo; /* code or pointer to sf_si */ 45 abi_ulong sf_ucontext; /* points to sf_uc */ 46 abi_ulong sf_addr; /* undocumented 4th arg */ 47 target_ucontext_t sf_uc; /* = *sf_uncontext */ 48 target_siginfo_t sf_si; /* = *sf_siginfo (SA_SIGINFO case)*/ 49 uint32_t __spare__[2]; 50 }; 51 52 /* 53 * Compare to amd64/amd64/machdep.c sendsig() 54 * Assumes that target stack frame memory is locked. 55 */ 56 static inline abi_long set_sigtramp_args(CPUX86State *regs, 57 int sig, struct target_sigframe *frame, abi_ulong frame_addr, 58 struct target_sigaction *ka) 59 { 60 /* XXX return -TARGET_EOPNOTSUPP; */ 61 return 0; 62 } 63 64 /* Compare to amd64/amd64/machdep.c get_mcontext() */ 65 static inline abi_long get_mcontext(CPUX86State *regs, 66 target_mcontext_t *mcp, int flags) 67 { 68 /* XXX */ 69 return -TARGET_EOPNOTSUPP; 70 } 71 72 /* Compare to amd64/amd64/machdep.c set_mcontext() */ 73 static inline abi_long set_mcontext(CPUX86State *regs, 74 target_mcontext_t *mcp, int srflag) 75 { 76 /* XXX */ 77 return -TARGET_EOPNOTSUPP; 78 } 79 80 static inline abi_long get_ucontext_sigreturn(CPUX86State *regs, 81 abi_ulong target_sf, abi_ulong *target_uc) 82 { 83 /* XXX */ 84 *target_uc = 0; 85 return -TARGET_EOPNOTSUPP; 86 } 87 88 #endif /* !TARGET_ARCH_SIGNAL_H_ */ 89