diff options
author | Liam <byteslice@airmail.cc> | 2023-03-07 04:47:06 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-03-13 03:06:53 +0100 |
commit | d1b53c8d82254a05c03bf2e57b9a5d5a6295abda (patch) | |
tree | 738f77aaa53264939d45240cf37e52c496b6b0c5 /src/core/hle/kernel/k_spin_lock.h | |
parent | kernel: convert KAbstractSchedulerLock (diff) | |
download | yuzu-d1b53c8d82254a05c03bf2e57b9a5d5a6295abda.tar yuzu-d1b53c8d82254a05c03bf2e57b9a5d5a6295abda.tar.gz yuzu-d1b53c8d82254a05c03bf2e57b9a5d5a6295abda.tar.bz2 yuzu-d1b53c8d82254a05c03bf2e57b9a5d5a6295abda.tar.lz yuzu-d1b53c8d82254a05c03bf2e57b9a5d5a6295abda.tar.xz yuzu-d1b53c8d82254a05c03bf2e57b9a5d5a6295abda.tar.zst yuzu-d1b53c8d82254a05c03bf2e57b9a5d5a6295abda.zip |
Diffstat (limited to 'src/core/hle/kernel/k_spin_lock.h')
-rw-r--r-- | src/core/hle/kernel/k_spin_lock.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/hle/kernel/k_spin_lock.h b/src/core/hle/kernel/k_spin_lock.h index 397a93d21..094a1e6be 100644 --- a/src/core/hle/kernel/k_spin_lock.h +++ b/src/core/hle/kernel/k_spin_lock.h @@ -5,26 +5,24 @@ #include <mutex> +#include "common/common_funcs.h" #include "core/hle/kernel/k_scoped_lock.h" namespace Kernel { class KSpinLock { public: - KSpinLock() = default; + explicit KSpinLock() = default; - KSpinLock(const KSpinLock&) = delete; - KSpinLock& operator=(const KSpinLock&) = delete; - - KSpinLock(KSpinLock&&) = delete; - KSpinLock& operator=(KSpinLock&&) = delete; + YUZU_NON_COPYABLE(KSpinLock); + YUZU_NON_MOVEABLE(KSpinLock); void Lock(); void Unlock(); - [[nodiscard]] bool TryLock(); + bool TryLock(); private: - std::mutex lck; + std::mutex m_lock; }; // TODO(bunnei): Alias for now, in case we want to implement these accurately in the future. |