diff options
author | Subv <subv2112@gmail.com> | 2018-04-20 21:45:52 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2018-04-21 04:04:33 +0200 |
commit | be155f4d9d410886853c25ffa032ce41a7428337 (patch) | |
tree | 0cdfd46181a5639339cbbf7d22ed31d9c1d8486b /src/core/hle/kernel/condition_variable.h | |
parent | Kernel: Remove old and unused Mutex code. (diff) | |
download | yuzu-be155f4d9d410886853c25ffa032ce41a7428337.tar yuzu-be155f4d9d410886853c25ffa032ce41a7428337.tar.gz yuzu-be155f4d9d410886853c25ffa032ce41a7428337.tar.bz2 yuzu-be155f4d9d410886853c25ffa032ce41a7428337.tar.lz yuzu-be155f4d9d410886853c25ffa032ce41a7428337.tar.xz yuzu-be155f4d9d410886853c25ffa032ce41a7428337.tar.zst yuzu-be155f4d9d410886853c25ffa032ce41a7428337.zip |
Diffstat (limited to 'src/core/hle/kernel/condition_variable.h')
-rw-r--r-- | src/core/hle/kernel/condition_variable.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/core/hle/kernel/condition_variable.h b/src/core/hle/kernel/condition_variable.h deleted file mode 100644 index 1c9f06769..000000000 --- a/src/core/hle/kernel/condition_variable.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2018 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include <string> -#include <queue> -#include "common/common_types.h" -#include "core/hle/kernel/kernel.h" -#include "core/hle/kernel/wait_object.h" -#include "core/hle/result.h" - -namespace Kernel { - -class ConditionVariable final : public WaitObject { -public: - /** - * Creates a condition variable. - * @param guest_addr Address of the object tracking the condition variable in guest memory. If - * specified, this condition variable will update the guest object when its state changes. - * @param name Optional name of condition variable. - * @return The created condition variable. - */ - static ResultVal<SharedPtr<ConditionVariable>> Create(VAddr guest_addr, - std::string name = "Unknown"); - - std::string GetTypeName() const override { - return "ConditionVariable"; - } - std::string GetName() const override { - return name; - } - - static const HandleType HANDLE_TYPE = HandleType::ConditionVariable; - HandleType GetHandleType() const override { - return HANDLE_TYPE; - } - - s32 GetAvailableCount() const; - void SetAvailableCount(s32 value) const; - - std::string name; ///< Name of condition variable (optional) - VAddr guest_addr; ///< Address of the guest condition variable value - VAddr mutex_addr; ///< (optional) Address of guest mutex value associated with this condition - ///< variable, used for implementing events - - bool ShouldWait(Thread* thread) const override; - void Acquire(Thread* thread) override; - - /** - * Releases a slot from a condition variable. - * @param target The number of threads to wakeup, -1 is all. - * @return ResultCode indicating if the operation succeeded. - */ - ResultCode Release(s32 target); - -private: - ConditionVariable(); - ~ConditionVariable() override; -}; - -} // namespace Kernel |