]> Git Repo - qemu.git/blame - bsd-user/signal.c
bsd-user/signal.c: implement force_sig_fault
[qemu.git] / bsd-user / signal.c
CommitLineData
84778508
BS
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
8167ee88 17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
84778508 18 */
84778508 19
5abfac27 20#include "qemu/osdep.h"
84778508 21#include "qemu.h"
0ef59989 22#include "signal-common.h"
84778508 23
835b04ed
WL
24/*
25 * Stubbed out routines until we merge signal support from bsd-user
26 * fork.
27 */
28
5abfac27
WL
29/*
30 * Queue a signal so that it will be send to the virtual CPU as soon as
31 * possible.
32 */
33void 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
0ef59989
WL
38/*
39 * Force a synchronously taken QEMU_SI_FAULT signal. For QEMU the
40 * 'force' part is handled in process_pending_signals().
41 */
42void 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
84778508
BS
55void signal_init(void)
56{
57}
58
9349b4f9 59void process_pending_signals(CPUArchState *cpu_env)
84778508
BS
60{
61}
835b04ed
WL
62
63void 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
71void 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}
This page took 0.596314 seconds and 4 git commands to generate.