#include <T2Mutex_Win.h>
Definition at line 5 of file T2Mutex_Win.h.
◆ Flags
◆ Flags_
Enumerator |
---|
Flags_Standard | |
Flags_DoNotWait | |
Definition at line 9 of file T2Mutex_Win.h.
◆ T2Mutex()
◆ ~T2Mutex()
◆ Create()
TBOOL T2Mutex::Create |
( |
| ) |
|
Definition at line 14 of file T2Mutex_Win.cpp.
15{
17 m_Mutex = CreateMutexA( NULL, FALSE, NULL );
18 TASSERT( m_Mutex != NULL,
"Failed to create mutex" );
20}
◆ Destroy()
void T2Mutex::Destroy |
( |
| ) |
|
Definition at line 38 of file T2Mutex_Win.cpp.
39{
40 CloseHandle( m_Mutex );
41 m_Mutex = NULL;
42}
◆ Lock()
Definition at line 22 of file T2Mutex_Win.cpp.
23{
24 TASSERT( m_Mutex != NULL,
"Mutex is NULL" );
25
27 DWORD result = WaitForSingleObject( m_Mutex, waitForMs );
28
29 return result == WAIT_OBJECT_0;
30}
◆ operator TBOOL()
T2Mutex::operator TBOOL |
( |
| ) |
const |
|
inline |
◆ Unlock()
TBOOL T2Mutex::Unlock |
( |
| ) |
|
Definition at line 32 of file T2Mutex_Win.cpp.
33{
34 TASSERT( m_Mutex != NULL,
"Mutex is NULL" );
35 return ReleaseMutex( m_Mutex );
36}
The documentation for this class was generated from the following files:
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Platform/Windows/T2Mutex_Win.h
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Platform/Windows/T2Mutex_Win.cpp