From e86a7e36912b6f3fc64a594338d3c1ac768e3bb8 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 29 Jan 2021 22:48:06 -0800 Subject: hle: kernel: Rename ReadableEvent to KReadableEvent. --- src/core/hle/service/btm/btm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/service/btm/btm.cpp') diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index 38b55300e..9ec4235a2 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp @@ -8,8 +8,8 @@ #include "core/core.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/hle_ipc.h" +#include "core/hle/kernel/k_readable_event.h" #include "core/hle/kernel/kernel.h" -#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/writable_event.h" #include "core/hle/service/btm/btm.h" #include "core/hle/service/service.h" -- cgit v1.2.3 From 3f942c01f0d8c42837c49a164ed78f6410d62bda Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 29 Jan 2021 23:51:40 -0800 Subject: hle: kernel: Rename WritableEvent to KWritableEvent. --- src/core/hle/service/btm/btm.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/btm/btm.cpp') diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index 9ec4235a2..3af51d603 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp @@ -9,8 +9,8 @@ #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/k_readable_event.h" +#include "core/hle/kernel/k_writable_event.h" #include "core/hle/kernel/kernel.h" -#include "core/hle/kernel/writable_event.h" #include "core/hle/service/btm/btm.h" #include "core/hle/service/service.h" @@ -58,12 +58,12 @@ public: RegisterHandlers(functions); auto& kernel = system.Kernel(); - scan_event = Kernel::WritableEvent::CreateEventPair(kernel, "IBtmUserCore:ScanEvent"); + scan_event = Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:ScanEvent"); connection_event = - Kernel::WritableEvent::CreateEventPair(kernel, "IBtmUserCore:ConnectionEvent"); + Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:ConnectionEvent"); service_discovery = - Kernel::WritableEvent::CreateEventPair(kernel, "IBtmUserCore:Discovery"); - config_event = Kernel::WritableEvent::CreateEventPair(kernel, "IBtmUserCore:ConfigEvent"); + Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:Discovery"); + config_event = Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:ConfigEvent"); } private: -- cgit v1.2.3 From ff3c7c068b926399513bf7328c22e224ab0b53d6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 31 Jan 2021 01:38:57 -0800 Subject: hle: kernel: Reimplement KReadableEvent and KWritableEvent. --- src/core/hle/service/btm/btm.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'src/core/hle/service/btm/btm.cpp') diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index 3af51d603..9cf2ee92a 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp @@ -8,8 +8,8 @@ #include "core/core.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/hle_ipc.h" +#include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_readable_event.h" -#include "core/hle/kernel/k_writable_event.h" #include "core/hle/kernel/kernel.h" #include "core/hle/service/btm/btm.h" #include "core/hle/service/service.h" @@ -58,12 +58,14 @@ public: RegisterHandlers(functions); auto& kernel = system.Kernel(); - scan_event = Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:ScanEvent"); - connection_event = - Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:ConnectionEvent"); - service_discovery = - Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:Discovery"); - config_event = Kernel::KWritableEvent::CreateEventPair(kernel, "IBtmUserCore:ConfigEvent"); + scan_event = Kernel::KEvent::Create(kernel, "IBtmUserCore:ScanEvent"); + scan_event->Initialize(); + connection_event = Kernel::KEvent::Create(kernel, "IBtmUserCore:ConnectionEvent"); + connection_event->Initialize(); + service_discovery = Kernel::KEvent::Create(kernel, "IBtmUserCore:Discovery"); + service_discovery->Initialize(); + config_event = Kernel::KEvent::Create(kernel, "IBtmUserCore:ConfigEvent"); + config_event->Initialize(); } private: @@ -72,7 +74,7 @@ private: IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(scan_event.readable); + rb.PushCopyObjects(scan_event->GetReadableEvent()); } void AcquireBleConnectionEvent(Kernel::HLERequestContext& ctx) { @@ -80,7 +82,7 @@ private: IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(connection_event.readable); + rb.PushCopyObjects(connection_event->GetReadableEvent()); } void AcquireBleServiceDiscoveryEvent(Kernel::HLERequestContext& ctx) { @@ -88,7 +90,7 @@ private: IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(service_discovery.readable); + rb.PushCopyObjects(service_discovery->GetReadableEvent()); } void AcquireBleMtuConfigEvent(Kernel::HLERequestContext& ctx) { @@ -96,13 +98,13 @@ private: IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(config_event.readable); + rb.PushCopyObjects(config_event->GetReadableEvent()); } - Kernel::EventPair scan_event; - Kernel::EventPair connection_event; - Kernel::EventPair service_discovery; - Kernel::EventPair config_event; + std::shared_ptr scan_event; + std::shared_ptr connection_event; + std::shared_ptr service_discovery; + std::shared_ptr config_event; }; class BTM_USR final : public ServiceFramework { -- cgit v1.2.3