]> Git Repo - qemu.git/blame - linux-user/signal-common.h
linux-user: create a dummy per arch signal.c
[qemu.git] / linux-user / signal-common.h
CommitLineData
befb7447
LV
1/*
2 * Emulation of Linux signals
3 *
4 * Copyright (c) 2003 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#ifndef SIGNAL_COMMON_H
21#define SIGNAL_COMMON_H
22extern struct target_sigaltstack target_sigaltstack_used;
23
24static inline int on_sig_stack(unsigned long sp)
25{
26 return (sp - target_sigaltstack_used.ss_sp
27 < target_sigaltstack_used.ss_size);
28}
29
30static inline int sas_ss_flags(unsigned long sp)
31{
32 return (target_sigaltstack_used.ss_size == 0 ? SS_DISABLE
33 : on_sig_stack(sp) ? SS_ONSTACK : 0);
34}
35
36static inline void target_sigemptyset(target_sigset_t *set)
37{
38 memset(set, 0, sizeof(*set));
39}
40
41void host_to_target_sigset_internal(target_sigset_t *d,
42 const sigset_t *s);
43void target_to_host_sigset_internal(sigset_t *d,
44 const target_sigset_t *s);
45void tswap_siginfo(target_siginfo_t *tinfo,
46 const target_siginfo_t *info);
47void set_sigmask(const sigset_t *set);
48void force_sig(int sig);
49void force_sigsegv(int oldsig);
50#endif
This page took 0.026121 seconds and 4 git commands to generate.