mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 06:54:15 +01:00
Fix SvcClearEvent resetting behaviour
SvcClearEvent previously set the `signalled` flag directly rather than calling `ResetSignal`, which skipped the locking necessary to make it globally visible. Switch it to use `ResetSignal` to fix this.
This commit is contained in:
parent
a621408b9c
commit
861d7e9eb2
@ -443,9 +443,16 @@ namespace skyline::kernel::svc {
|
||||
}
|
||||
|
||||
void ClearEvent(const DeviceState &state) {
|
||||
auto object{state.process->GetHandle<type::KEvent>(state.ctx->gpr.w0)};
|
||||
object->signalled = false;
|
||||
state.ctx->gpr.w0 = Result{};
|
||||
KHandle handle{state.ctx->gpr.w0};
|
||||
try {
|
||||
std::static_pointer_cast<type::KEvent>(state.process->GetHandle(handle))->ResetSignal();
|
||||
state.logger->Debug("svcClearEvent: Clearing event: 0x{:X}", handle);
|
||||
state.ctx->gpr.w0 = Result{};
|
||||
} catch (const std::out_of_range &) {
|
||||
state.logger->Warn("svcClearEvent: 'handle' invalid: 0x{:X}", handle);
|
||||
state.ctx->gpr.w0 = result::InvalidHandle;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void MapSharedMemory(const DeviceState &state) {
|
||||
|
Loading…
Reference in New Issue
Block a user