50 pthread_mutexattr_t attr;
51 pthread_mutexattr_init(&attr);
52 status = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
53 FXASSERT(status == 0);
55 status = pthread_mutex_init((pthread_mutex_t*)
mutexHandle, &attr);
56 FXASSERT(status == 0);
58 pthread_mutexattr_destroy(&attr);
60 mutexHandle = CreateMutex(NULL, FALSE, NULL);
61 FXASSERT(mutexHandle != NULL);
71 fxerror(
"MFXMutex: mutex still locked\n");
74 pthread_mutex_destroy((pthread_mutex_t*)
mutexHandle);
77 CloseHandle(mutexHandle);
87 WaitForSingleObject(mutexHandle,
INFINITE);
96 pthread_mutex_unlock((pthread_mutex_t*)
mutexHandle);
98 ReleaseMutex(mutexHandle);
FXThreadMutex mutexHandle
void unlock()
release mutex lock
MFXMutex()
create me a mutex :-)