summaryrefslogtreecommitdiff
path: root/Runtime/Threading/Mutex.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-10-26 09:48:47 +0800
committerchai <chaifix@163.com>2021-10-26 09:48:47 +0800
commitef7aedf5f272c52247d8ee9522d7b2896d21af63 (patch)
treec1259190bd51ed1225017507cd01612cc5a73a8c /Runtime/Threading/Mutex.h
parente7c760c884d90ef22fe46508b18081fe6e0f9291 (diff)
*misc
Diffstat (limited to 'Runtime/Threading/Mutex.h')
-rw-r--r--Runtime/Threading/Mutex.h10
1 files changed, 5 insertions, 5 deletions
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