mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 18:20:05 +00:00
nce: adjust initialization for repeated calls
This commit is contained in:
parent
bd59934350
commit
a05c242429
@ -251,21 +251,24 @@ void ArmNce::SetSvcArguments(std::span<const uint64_t, 8> args) {
|
||||
ArmNce::ArmNce(System& system, bool uses_wall_clock, std::size_t core_index)
|
||||
: ArmInterface{uses_wall_clock}, m_system{system}, m_core_index{core_index} {
|
||||
m_guest_ctx.system = &m_system;
|
||||
|
||||
// Allocate signal stack.
|
||||
m_stack = std::make_unique<u8[]>(StackSize);
|
||||
}
|
||||
|
||||
ArmNce::~ArmNce() = default;
|
||||
|
||||
void ArmNce::Initialize() {
|
||||
if (m_thread_id == -1) {
|
||||
m_thread_id = gettid();
|
||||
}
|
||||
|
||||
// Configure signal stack.
|
||||
if (!m_stack) {
|
||||
m_stack = std::make_unique<u8[]>(StackSize);
|
||||
|
||||
stack_t ss{};
|
||||
ss.ss_sp = m_stack.get();
|
||||
ss.ss_size = StackSize;
|
||||
sigaltstack(&ss, nullptr);
|
||||
}
|
||||
|
||||
// Set up signals.
|
||||
static std::once_flag flag;
|
||||
|
Loading…
Reference in New Issue
Block a user