diff options
author | Liam <byteslice@airmail.cc> | 2022-10-13 02:26:04 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-10-13 02:29:29 +0200 |
commit | a9ace6856de57f1124daaa77aacd6f36a64c68f7 (patch) | |
tree | acf105c0e57d62889e2ebf88b463a7ebf7adc0b4 /src/core/hle/kernel/k_event.h | |
parent | Merge pull request #9027 from yuzu-emu/revert-8987-another-name-for-reinforcement-steel (diff) | |
download | yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.gz yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.bz2 yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.lz yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.xz yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.tar.zst yuzu-a9ace6856de57f1124daaa77aacd6f36a64c68f7.zip |
Diffstat (limited to 'src/core/hle/kernel/k_event.h')
-rw-r--r-- | src/core/hle/kernel/k_event.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/core/hle/kernel/k_event.h b/src/core/hle/kernel/k_event.h index 2ff828feb..48ce7d9a0 100644 --- a/src/core/hle/kernel/k_event.h +++ b/src/core/hle/kernel/k_event.h @@ -4,14 +4,12 @@ #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 { class KernelCore; class KReadableEvent; -class KWritableEvent; class KProcess; class KEvent final : public KAutoObjectWithSlabHeapAndContainer<KEvent, KAutoObjectWithList> { @@ -21,37 +19,40 @@ public: explicit KEvent(KernelCore& kernel_); ~KEvent() override; - void Initialize(std::string&& name, KProcess* owner_); + void Initialize(KProcess* owner); void Finalize() override; bool IsInitialized() const override { - return initialized; + return m_initialized; } uintptr_t GetPostDestroyArgument() const override { - return reinterpret_cast<uintptr_t>(owner); + return reinterpret_cast<uintptr_t>(m_owner); } KProcess* GetOwner() const override { - return owner; + return m_owner; } KReadableEvent& GetReadableEvent() { - return readable_event; - } - - KWritableEvent& GetWritableEvent() { - return writable_event; + return m_readable_event; } static void PostDestroy(uintptr_t arg); + Result Signal(); + Result Clear(); + + void OnReadableEventDestroyed() { + m_readable_event_destroyed = true; + } + private: - KReadableEvent readable_event; - KWritableEvent writable_event; - KProcess* owner{}; - bool initialized{}; + KReadableEvent m_readable_event; + KProcess* m_owner{}; + bool m_initialized{}; + bool m_readable_event_destroyed{}; }; } // namespace Kernel |