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_writable_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_writable_event.h')
-rw-r--r-- | src/core/hle/kernel/k_writable_event.h | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/core/hle/kernel/k_writable_event.h b/src/core/hle/kernel/k_writable_event.h index 518f5448d..7cf43f77e 100644 --- a/src/core/hle/kernel/k_writable_event.h +++ b/src/core/hle/kernel/k_writable_event.h @@ -4,7 +4,9 @@ #pragma once +#include "core/hle/kernel/k_auto_object.h" #include "core/hle/kernel/object.h" +#include "core/hle/kernel/slab_helpers.h" #include "core/hle/result.h" namespace Kernel { @@ -12,11 +14,28 @@ namespace Kernel { class KernelCore; class KEvent; -class KWritableEvent final : public Object { +class KWritableEvent final + : public KAutoObjectWithSlabHeapAndContainer<KWritableEvent, KAutoObjectWithList> { + KERNEL_AUTOOBJECT_TRAITS(KWritableEvent, KAutoObject); + public: - explicit KWritableEvent(KernelCore& kernel, std::string&& name); + explicit KWritableEvent(KernelCore& kernel); ~KWritableEvent() override; + virtual void Destroy() override; + + static void PostDestroy([[maybe_unused]] uintptr_t arg) {} + + void Initialize(KEvent* parent_, std::string&& name_); + ResultCode Signal(); + ResultCode Clear(); + + constexpr KEvent* GetParent() const { + return parent; + } + + // DEPRECATED + std::string GetTypeName() const override { return "KWritableEvent"; } @@ -26,17 +45,6 @@ public: return HANDLE_TYPE; } - void Initialize(KEvent* parent_); - - void Finalize() override {} - - ResultCode Signal(); - ResultCode Clear(); - - KEvent* GetParent() const { - return parent; - } - private: KEvent* parent{}; }; |