49 pthread_mutexattr_t attr;
50 pthread_mutexattr_init(&attr);
51 status = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
52 FXASSERT(status == 0);
54 status = pthread_mutex_init((pthread_mutex_t*)
mutexHandle, &attr);
55 FXASSERT(status == 0);
57 pthread_mutexattr_destroy(&attr);
59 mutexHandle = CreateMutex(NULL, FALSE, NULL);
60 FXASSERT(mutexHandle != NULL);
70 fxerror(
"MFXMutex: mutex still locked\n");
73 pthread_mutex_destroy((pthread_mutex_t*)
mutexHandle);
76 CloseHandle(mutexHandle);
86 WaitForSingleObject(mutexHandle,
INFINITE);
95 pthread_mutex_unlock((pthread_mutex_t*)
mutexHandle);
97 ReleaseMutex(mutexHandle);
FXThreadMutex mutexHandle
void unlock()
release mutex lock
MFXMutex()
create me a mutex :-)