blob: 51030a93069ae71f00a56d45e7a33bf52ac1af4b [file] [log] [blame]
Laurent Vivierbefb7442018-04-24 21:26:16 +02001/*
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
Laurent Vivier465e2372018-04-11 21:23:47 +020024int on_sig_stack(unsigned long sp);
25int sas_ss_flags(unsigned long sp);
26abi_ulong target_sigsp(abi_ulong sp, struct target_sigaction *ka);
27void target_save_altstack(target_stack_t *uss, CPUArchState *env);
Laurent Vivierbefb7442018-04-24 21:26:16 +020028
29static inline void target_sigemptyset(target_sigset_t *set)
30{
31 memset(set, 0, sizeof(*set));
32}
33
34void host_to_target_sigset_internal(target_sigset_t *d,
35 const sigset_t *s);
36void target_to_host_sigset_internal(sigset_t *d,
37 const target_sigset_t *s);
38void tswap_siginfo(target_siginfo_t *tinfo,
39 const target_siginfo_t *info);
40void set_sigmask(const sigset_t *set);
41void force_sig(int sig);
42void force_sigsegv(int oldsig);
Laurent Viviercb6ac802018-04-24 21:26:35 +020043#if defined(TARGET_ARCH_HAS_SETUP_FRAME)
44void setup_frame(int sig, struct target_sigaction *ka,
45 target_sigset_t *set, CPUArchState *env);
46#endif
47void setup_rt_frame(int sig, struct target_sigaction *ka,
48 target_siginfo_t *info,
49 target_sigset_t *set, CPUArchState *env);
Laurent Vivierbefb7442018-04-24 21:26:16 +020050#endif