44 pthread_mutexattr_t attr;
45 pthread_mutexattr_init(&attr);
46 status = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
47 FXASSERT(status == 0);
49 status = pthread_mutex_init((pthread_mutex_t*)
mutexHandle, &attr);
50 FXASSERT(status == 0);
52 pthread_mutexattr_destroy(&attr);
54 mutexHandle = CreateMutex(
nullptr, FALSE,
nullptr);
55 FXASSERT(mutexHandle != NULL);
65 fxerror(
"MFXMutex: mutex still locked\n");
68 pthread_mutex_destroy((pthread_mutex_t*)
mutexHandle);
71 CloseHandle(mutexHandle);
81 WaitForSingleObject(mutexHandle,
INFINITE);
90 pthread_mutex_unlock((pthread_mutex_t*)
mutexHandle);
92 ReleaseMutex(mutexHandle);
FXThreadMutex mutexHandle
mutex handler
virtual ~MFXMutex()
destructor
void unlock()
release mutex lock