diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-27 00:34:07 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-29 14:45:41 +0100 |
commit | ff610103b58b3e0dd39fafb539a1cc0bc0fae577 (patch) | |
tree | cbd54b09f9270f6f1d92a2f45a5ccdb307569093 /src/core/hle/service/nifm/nifm.cpp | |
parent | hle_ipc: Use event pair for SleepClientThread (diff) | |
download | yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.gz yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.bz2 yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.lz yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.xz yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.zst yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.zip |
Diffstat (limited to 'src/core/hle/service/nifm/nifm.cpp')
-rw-r--r-- | src/core/hle/service/nifm/nifm.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index dee391201..80a66bce3 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -4,7 +4,9 @@ #include "core/core.h" #include "core/hle/ipc_helpers.h" -#include "core/hle/kernel/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/nifm/nifm.h" #include "core/hle/service/service.h" @@ -56,8 +58,10 @@ public: RegisterHandlers(functions); auto& kernel = Core::System::GetInstance().Kernel(); - event1 = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, "IRequest:Event1"); - event2 = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, "IRequest:Event2"); + event1 = Kernel::WritableEvent::CreateRegisteredEventPair( + kernel, Kernel::ResetType::OneShot, "IRequest:Event1"); + event2 = Kernel::WritableEvent::CreateRegisteredEventPair( + kernel, Kernel::ResetType::OneShot, "IRequest:Event2"); } private: @@ -88,7 +92,11 @@ private: IPC::ResponseBuilder rb{ctx, 2, 2}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(event1, event2); + + const auto& event1{Core::System::GetInstance().Kernel().FindNamedEvent("IRequest:Event1")}; + const auto& event2{Core::System::GetInstance().Kernel().FindNamedEvent("IRequest:Event2")}; + + rb.PushCopyObjects(event1->second, event2->second); } void Cancel(Kernel::HLERequestContext& ctx) { @@ -105,7 +113,7 @@ private: rb.Push(RESULT_SUCCESS); } - Kernel::SharedPtr<Kernel::Event> event1, event2; + Kernel::SharedPtr<Kernel::WritableEvent> event1, event2; }; class INetworkProfile final : public ServiceFramework<INetworkProfile> { |