From bff33c67ab4f668aab7cfa32dbab14302d41155f Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Thu, 16 Sep 2021 00:19:27 -0700 Subject: [PATCH] LibThreading: Neither Mutex or MutexLocker should be movable / copyable --- Userland/Libraries/LibThreading/Mutex.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/Libraries/LibThreading/Mutex.h b/Userland/Libraries/LibThreading/Mutex.h index 9bd961545f1..209598cb8fc 100644 --- a/Userland/Libraries/LibThreading/Mutex.h +++ b/Userland/Libraries/LibThreading/Mutex.h @@ -13,6 +13,8 @@ namespace Threading { class Mutex { + AK_MAKE_NONCOPYABLE(Mutex); + AK_MAKE_NONMOVABLE(Mutex); friend class ConditionVariable; public: @@ -39,6 +41,9 @@ private: }; class MutexLocker { + AK_MAKE_NONCOPYABLE(MutexLocker); + AK_MAKE_NONMOVABLE(MutexLocker); + public: ALWAYS_INLINE explicit MutexLocker(Mutex& mutex) : m_mutex(mutex)