From ef7aedf5f272c52247d8ee9522d7b2896d21af63 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 26 Oct 2021 09:48:47 +0800 Subject: *misc --- Runtime/Threading/Mutex.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Runtime/Threading/Mutex.h') diff --git a/Runtime/Threading/Mutex.h b/Runtime/Threading/Mutex.h index 44f8cb9..eed69aa 100644 --- a/Runtime/Threading/Mutex.h +++ b/Runtime/Threading/Mutex.h @@ -7,8 +7,8 @@ public: Mutex(); ~Mutex(); - void Lock(); - void Unlock(); + void LockSelf(); + void UnlockSelf(); private: HANDLE m_Handle; @@ -22,11 +22,11 @@ public: MutexLocker(Mutex& mutex) : m(mutex) { - m.Lock(); + m.LockSelf(); }; ~MutexLocker() { - m.Unlock(); + m.UnlockSelf(); } operator bool() { return false; }; private: @@ -34,6 +34,6 @@ private: Mutex& m; }; -#define _lock(m) \ +#define Lock(m) \ if(MutexLocker lock_##m = m){} else -- cgit v1.1-26-g67d0