diff options
author | Warner Losh <imp@bsdimp.com> | 2022-01-08 16:57:31 -0700 |
---|---|---|
committer | Warner Losh <imp@bsdimp.com> | 2022-01-28 15:52:39 -0700 |
commit | 149076ade7b8250fa62a6b1e7462f8d2c340b27e (patch) | |
tree | 48eb1a8c4fee931255e7653de7f612bd5a0181db /bsd-user/qemu.h | |
parent | 1366ef817a151f8f89a561494ea24204ad7917c7 (diff) |
bsd-user/signal.c: Implement signal_init()
Initialize the signal state for the emulator. Setup a set of sane
default signal handlers, mirroring the host's signals. For fatal signals
(those that exit by default), establish our own set of signal
handlers. Stub out the actual signal handler we use for the moment.
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Kyle Evans <kevans@freebsd.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> XXX SIGPROF PENDING
Diffstat (limited to 'bsd-user/qemu.h')
-rw-r--r-- | bsd-user/qemu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 99c37fc994..49f01932a5 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -94,6 +94,13 @@ typedef struct TaskState { * from multiple threads.) */ int signal_pending; + /* + * This thread's signal mask, as requested by the guest program. + * The actual signal mask of this thread may differ: + * + we don't let SIGSEGV and SIGBUS be blocked while running guest code + * + sometimes we block all signals to avoid races + */ + sigset_t signal_mask; uint8_t stack[]; } __attribute__((aligned(16))) TaskState; |