27 data_ =
new CRITICAL_SECTION;
28 InitializeCriticalSection((LPCRITICAL_SECTION)data_);
33 DeleteCriticalSection((LPCRITICAL_SECTION)data_);
34 delete (LPCRITICAL_SECTION)data_;
41 EnterCriticalSection((LPCRITICAL_SECTION)data_);
48 LeaveCriticalSection((LPCRITICAL_SECTION)data_);
55 return TryEnterCriticalSection((LPCRITICAL_SECTION)data_);
bool acquire()
Attempts to unconditionally acquire the lock.
bool release()
Attempts to release the lock.
MutexImpl(bool recursive=true)
Initializes the lock but doesn't acquire it.
~MutexImpl()
Releases and removes the lock.
bool tryacquire()
Attempts to acquire the lock without blocking.