From ff610103b58b3e0dd39fafb539a1cc0bc0fae577 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 26 Nov 2018 18:34:07 -0500 Subject: core: Port all current usages of Event to Readable/WritableEvent --- src/core/hle/kernel/svc.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core/hle/kernel/svc.cpp') diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 5e9660a48..85a9c50fb 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -20,17 +20,18 @@ #include "core/hle/kernel/address_arbiter.h" #include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_session.h" -#include "core/hle/kernel/event.h" #include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/mutex.h" #include "core/hle/kernel/process.h" +#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/resource_limit.h" #include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/shared_memory.h" #include "core/hle/kernel/svc.h" #include "core/hle/kernel/svc_wrap.h" #include "core/hle/kernel/thread.h" +#include "core/hle/kernel/writable_event.h" #include "core/hle/lock.h" #include "core/hle/result.h" #include "core/hle/service/service.h" @@ -1361,11 +1362,11 @@ static ResultCode ResetSignal(Handle handle) { LOG_DEBUG(Kernel_SVC, "called handle 0x{:08X}", handle); const auto& handle_table = Core::CurrentProcess()->GetHandleTable(); - auto event = handle_table.Get(handle); + auto event = handle_table.Get(handle); ASSERT(event != nullptr); - event->Clear(); + event->PromoteToWritable()->Clear(); return RESULT_SUCCESS; } @@ -1524,13 +1525,13 @@ static ResultCode ClearEvent(Handle handle) { LOG_TRACE(Kernel_SVC, "called, event=0x{:08X}", handle); const auto& handle_table = Core::CurrentProcess()->GetHandleTable(); - SharedPtr evt = handle_table.Get(handle); + SharedPtr evt = handle_table.Get(handle); if (evt == nullptr) { LOG_ERROR(Kernel_SVC, "Event handle does not exist, handle=0x{:08X}", handle); return ERR_INVALID_HANDLE; } - evt->Clear(); + evt->PromoteToWritable()->Clear(); return RESULT_SUCCESS; } -- cgit v1.2.3 From a342bcc9b130e9bd78720e09e04c92dcac8840d0 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Tue, 27 Nov 2018 09:18:29 -0500 Subject: kernel/event: Reference ReadableEvent from WritableEvent --- src/core/hle/kernel/svc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/hle/kernel/svc.cpp') diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 85a9c50fb..abc48ee54 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1366,7 +1366,7 @@ static ResultCode ResetSignal(Handle handle) { ASSERT(event != nullptr); - event->PromoteToWritable()->Clear(); + event->Clear(); return RESULT_SUCCESS; } @@ -1531,7 +1531,7 @@ static ResultCode ClearEvent(Handle handle) { return ERR_INVALID_HANDLE; } - evt->PromoteToWritable()->Clear(); + evt->Clear(); return RESULT_SUCCESS; } -- cgit v1.2.3