diff options
Diffstat (limited to 'src/common/signal_chain.h')
| -rw-r--r-- | src/common/signal_chain.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/signal_chain.h b/src/common/signal_chain.h new file mode 100644 index 000000000..8d06a1bd1 --- /dev/null +++ b/src/common/signal_chain.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #ifndef _WIN32 | ||
| 7 | |||
| 8 | #include <signal.h> | ||
| 9 | |||
| 10 | namespace Common { | ||
| 11 | |||
| 12 | // Android's ART overrides sigaction with its own wrapper. This is problematic for SIGSEGV | ||
| 13 | // in particular, because ART's handler accesses tpidr_el0, which conflicts with NCE. | ||
| 14 | // This extracts the libc symbol and calls it directly. | ||
| 15 | int SigAction(int signum, const struct sigaction* act, struct sigaction* oldact); | ||
| 16 | |||
| 17 | } // namespace Common | ||
| 18 | |||
| 19 | #endif | ||