1 /* 2 * Emulation of BSD signals 3 * 4 * Copyright (c) 2003 - 2008 Fabrice Bellard 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #include "qemu/osdep.h" 21 #include "qemu.h" 22 #include "signal-common.h" 23 24 /* 25 * Stubbed out routines until we merge signal support from bsd-user 26 * fork. 27 */ 28 29 /* 30 * Queue a signal so that it will be send to the virtual CPU as soon as 31 * possible. 32 */ 33 void queue_signal(CPUArchState *env, int sig, target_siginfo_t *info) 34 { 35 qemu_log_mask(LOG_UNIMP, "No signal queueing, dropping signal %d\n", sig); 36 } 37 38 /* 39 * Force a synchronously taken QEMU_SI_FAULT signal. For QEMU the 40 * 'force' part is handled in process_pending_signals(). 41 */ 42 void force_sig_fault(int sig, int code, abi_ulong addr) 43 { 44 CPUState *cpu = thread_cpu; 45 CPUArchState *env = cpu->env_ptr; 46 target_siginfo_t info = {}; 47 48 info.si_signo = sig; 49 info.si_errno = 0; 50 info.si_code = code; 51 info.si_addr = addr; 52 queue_signal(env, sig, &info); 53 } 54 55 void signal_init(void) 56 { 57 } 58 59 void process_pending_signals(CPUArchState *cpu_env) 60 { 61 } 62 63 void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr, 64 MMUAccessType access_type, bool maperr, uintptr_t ra) 65 { 66 qemu_log_mask(LOG_UNIMP, "No signal support for SIGSEGV\n"); 67 /* unreachable */ 68 abort(); 69 } 70 71 void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr, 72 MMUAccessType access_type, uintptr_t ra) 73 { 74 qemu_log_mask(LOG_UNIMP, "No signal support for SIGBUS\n"); 75 /* unreachable */ 76 abort(); 77 } 78