diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-10 11:34:26 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:51 +0200 |
commit | 2e8d6fe9a0c07538397682e1cb25992bfd15676d (patch) | |
tree | 444ee462a197818e0114150a03c0a5898cadaa19 /src/core/hle/kernel/k_event.h | |
parent | hle: ipc_helpers: Add methods for copy/move references. (diff) | |
download | yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.gz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.bz2 yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.lz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.xz yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.tar.zst yuzu-2e8d6fe9a0c07538397682e1cb25992bfd15676d.zip |
Diffstat (limited to 'src/core/hle/kernel/k_event.h')
-rw-r--r-- | src/core/hle/kernel/k_event.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/core/hle/kernel/k_event.h b/src/core/hle/kernel/k_event.h index 97ec0ea9c..2c48a0499 100644 --- a/src/core/hle/kernel/k_event.h +++ b/src/core/hle/kernel/k_event.h @@ -4,6 +4,8 @@ #pragma once +#include "core/hle/kernel/k_readable_event.h" +#include "core/hle/kernel/k_writable_event.h" #include "core/hle/kernel/slab_helpers.h" namespace Kernel { @@ -27,40 +29,39 @@ public: virtual bool IsInitialized() const override { return initialized; } + virtual uintptr_t GetPostDestroyArgument() const override { return reinterpret_cast<uintptr_t>(owner); } static void PostDestroy(uintptr_t arg); - std::string GetTypeName() const override { - return "KEvent"; + virtual Process* GetOwner() const override { + return owner; } - static constexpr HandleType HANDLE_TYPE = HandleType::Event; - HandleType GetHandleType() const override { - return HANDLE_TYPE; - } - - KReadableEvent* GetReadableEvent() { - return readable_event.get(); + KReadableEvent& GetReadableEvent() { + return readable_event; } - std::shared_ptr<KWritableEvent>& GetWritableEvent() { + KWritableEvent& GetWritableEvent() { return writable_event; } - const std::shared_ptr<KReadableEvent>& GetReadableEvent() const { - return readable_event; + // DEPRECATED + + std::string GetTypeName() const override { + return "KEvent"; } - const std::shared_ptr<KWritableEvent>& GetWritableEvent() const { - return writable_event; + static constexpr HandleType HANDLE_TYPE = HandleType::Event; + HandleType GetHandleType() const override { + return HANDLE_TYPE; } private: - std::shared_ptr<KReadableEvent> readable_event; - std::shared_ptr<KWritableEvent> writable_event; + KReadableEvent readable_event; + KWritableEvent writable_event; Process* owner{}; bool initialized{}; }; |