diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-06 08:00:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 08:00:43 +0100 |
commit | 1498a7c9a84037d7c78ff21b3bc996622269db43 (patch) | |
tree | 0fb418f721db6e307fb7105cc57fe3a2eec7d0bf /src/core/hle/kernel/k_writable_event.h | |
parent | Merge pull request #5875 from lioncash/identifier (diff) | |
parent | hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement. (diff) | |
download | yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.gz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.bz2 yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.lz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.xz yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.tar.zst yuzu-1498a7c9a84037d7c78ff21b3bc996622269db43.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_writable_event.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_writable_event.h b/src/core/hle/kernel/k_writable_event.h new file mode 100644 index 000000000..518f5448d --- /dev/null +++ b/src/core/hle/kernel/k_writable_event.h @@ -0,0 +1,44 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/kernel/object.h" +#include "core/hle/result.h" + +namespace Kernel { + +class KernelCore; +class KEvent; + +class KWritableEvent final : public Object { +public: + explicit KWritableEvent(KernelCore& kernel, std::string&& name); + ~KWritableEvent() override; + + std::string GetTypeName() const override { + return "KWritableEvent"; + } + + static constexpr HandleType HANDLE_TYPE = HandleType::WritableEvent; + HandleType GetHandleType() const override { + return HANDLE_TYPE; + } + + void Initialize(KEvent* parent_); + + void Finalize() override {} + + ResultCode Signal(); + ResultCode Clear(); + + KEvent* GetParent() const { + return parent; + } + +private: + KEvent* parent{}; +}; + +} // namespace Kernel |