diff options
author | bunnei <bunneidev@gmail.com> | 2021-01-31 10:38:57 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-02-05 23:03:32 +0100 |
commit | ff3c7c068b926399513bf7328c22e224ab0b53d6 (patch) | |
tree | c2a5d9f80ecf551659daa410cc384b1792eff31d /src/core/hle/kernel/svc.cpp | |
parent | hle: kernel: Implement KEvent. (diff) | |
download | yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.gz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.bz2 yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.lz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.xz yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.zst yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index f94eecbb8..9d036f45d 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -26,6 +26,7 @@ #include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/k_address_arbiter.h" #include "core/hle/kernel/k_condition_variable.h" +#include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_readable_event.h" #include "core/hle/kernel/k_resource_limit.h" #include "core/hle/kernel/k_scheduler.h" @@ -1870,18 +1871,18 @@ static ResultCode CreateEvent(Core::System& system, Handle* write_handle, Handle LOG_DEBUG(Kernel_SVC, "called"); auto& kernel = system.Kernel(); - const auto [readable_event, writable_event] = - KWritableEvent::CreateEventPair(kernel, "CreateEvent"); + const auto event = KEvent::Create(kernel, "CreateEvent"); + event->Initialize(); HandleTable& handle_table = kernel.CurrentProcess()->GetHandleTable(); - const auto write_create_result = handle_table.Create(writable_event); + const auto write_create_result = handle_table.Create(event->GetWritableEvent()); if (write_create_result.Failed()) { return write_create_result.Code(); } *write_handle = *write_create_result; - const auto read_create_result = handle_table.Create(readable_event); + const auto read_create_result = handle_table.Create(event->GetReadableEvent()); if (read_create_result.Failed()) { handle_table.Close(*write_create_result); return read_create_result.Code(); |