diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-13 14:16:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 14:16:16 +0100 |
commit | 1f952f6ac9e3aca3dba8e4286fe937616081a767 (patch) | |
tree | ca57513605bdef4767762614c074ca90b7791575 /src/core/hle/kernel/k_spin_lock.h | |
parent | Merge pull request #9942 from liamwhite/speling (diff) | |
parent | kernel: additional style fixes to KThread, KProcess (diff) | |
download | yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.gz yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.bz2 yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.lz yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.xz yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.zst yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.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. |