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/nvdrv | |
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/nvdrv')
-rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 11 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/interface.h | 7 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index ff76e0524..3d89b4020 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp @@ -6,7 +6,9 @@ #include "common/logging/log.h" #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/nvdrv/interface.h" #include "core/hle/service/nvdrv/nvdrv.h" @@ -69,7 +71,9 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { IPC::ResponseBuilder rb{ctx, 3, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(query_event); + + const auto& event{Core::System::GetInstance().Kernel().FindNamedEvent("NVDRV::query_event")}; + rb.PushCopyObjects(event->second); rb.Push<u32>(0); } @@ -127,7 +131,8 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) RegisterHandlers(functions); auto& kernel = Core::System::GetInstance().Kernel(); - query_event = Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, "NVDRV::query_event"); + query_event = Kernel::WritableEvent::CreateRegisteredEventPair( + kernel, Kernel::ResetType::OneShot, "NVDRV::query_event"); } NVDRV::~NVDRV() = default; diff --git a/src/core/hle/service/nvdrv/interface.h b/src/core/hle/service/nvdrv/interface.h index 5a1e4baa7..a27252038 100644 --- a/src/core/hle/service/nvdrv/interface.h +++ b/src/core/hle/service/nvdrv/interface.h @@ -5,10 +5,13 @@ #pragma once #include <memory> -#include "core/hle/kernel/event.h" #include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/service.h" +namespace Kernel { +class WritableEvent; +} + namespace Service::Nvidia { class NVDRV final : public ServiceFramework<NVDRV> { @@ -31,7 +34,7 @@ private: u64 pid{}; - Kernel::SharedPtr<Kernel::Event> query_event; + Kernel::SharedPtr<Kernel::WritableEvent> query_event; }; } // namespace Service::Nvidia |