diff options
author | Liam <byteslice@airmail.cc> | 2022-10-13 02:26:04 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-10-13 02:29:29 +0200 |
commit | a9ace6856de57f1124daaa77aacd6f36a64c68f7 (patch) | |
tree | acf105c0e57d62889e2ebf88b463a7ebf7adc0b4 /src/core/hle/kernel/svc.cpp | |
parent | Merge pull request #9027 from yuzu-emu/revert-8987-another-name-for-reinforcement-steel (diff) | |
download | yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.gz yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.bz2 yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.lz yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.xz yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.zst yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 27e5a805d..035607daf 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -34,7 +34,6 @@ #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread_queue.h" #include "core/hle/kernel/k_transfer_memory.h" -#include "core/hle/kernel/k_writable_event.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/physical_core.h" #include "core/hle/kernel/svc.h" @@ -2303,11 +2302,11 @@ static Result SignalEvent(Core::System& system, Handle event_handle) { // Get the current handle table. const KHandleTable& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); - // Get the writable event. - KScopedAutoObject writable_event = handle_table.GetObject<KWritableEvent>(event_handle); - R_UNLESS(writable_event.IsNotNull(), ResultInvalidHandle); + // Get the event. + KScopedAutoObject event = handle_table.GetObject<KEvent>(event_handle); + R_UNLESS(event.IsNotNull(), ResultInvalidHandle); - return writable_event->Signal(); + return event->Signal(); } static Result SignalEvent32(Core::System& system, Handle event_handle) { @@ -2322,9 +2321,9 @@ static Result ClearEvent(Core::System& system, Handle event_handle) { // Try to clear the writable event. { - KScopedAutoObject writable_event = handle_table.GetObject<KWritableEvent>(event_handle); - if (writable_event.IsNotNull()) { - return writable_event->Clear(); + KScopedAutoObject event = handle_table.GetObject<KEvent>(event_handle); + if (event.IsNotNull()) { + return event->Clear(); } } @@ -2362,24 +2361,24 @@ static Result CreateEvent(Core::System& system, Handle* out_write, Handle* out_r R_UNLESS(event != nullptr, ResultOutOfResource); // Initialize the event. - event->Initialize("CreateEvent", kernel.CurrentProcess()); + event->Initialize(kernel.CurrentProcess()); // Commit the thread reservation. event_reservation.Commit(); // Ensure that we clean up the event (and its only references are handle table) on function end. SCOPE_EXIT({ - event->GetWritableEvent().Close(); event->GetReadableEvent().Close(); + event->Close(); }); // Register the event. KEvent::Register(kernel, event); - // Add the writable event to the handle table. - R_TRY(handle_table.Add(out_write, std::addressof(event->GetWritableEvent()))); + // Add the event to the handle table. + R_TRY(handle_table.Add(out_write, event)); - // Add the writable event to the handle table. + // Ensure that we maintaing a clean handle state on exit. auto handle_guard = SCOPE_GUARD({ handle_table.Remove(*out_write); }); // Add the readable event to the handle table. |