50#define _WIN32_WINNT WINVER
56 InitializeCriticalSection ((LPCRITICAL_SECTION)&cs);
75 {SMTG_WARNING(
"mutex_init failed")}
81#warning implement FLock!
92 DeleteCriticalSection ((LPCRITICAL_SECTION)§ion);
101 FDebugPrint (
"FLock::lock () %x\n",
this);
108 EnterCriticalSection ((LPCRITICAL_SECTION)§ion);
117 FDebugPrint (
"FLock::unlock () %x\n",
this);
124 LeaveCriticalSection ((LPCRITICAL_SECTION)§ion);
136 return TryEnterCriticalSection ((LPCRITICAL_SECTION)§ion) != 0 ? true :
false;
FLock(const char8 *name="FLock")
Lock constructor.
void unlock() SMTG_OVERRIDE
Disables lock.
bool trylock() SMTG_OVERRIDE
Tries to disable lock.
~FLock() SMTG_OVERRIDE
Lock destructor.
void lock() SMTG_OVERRIDE
Enables lock.
pthread_mutexattr_settype
typedef pthread_mutexattr_t