Home » U++ Library support » U++ MT-multithreading and servers » PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP not defined
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP not defined [message #15917] |
Thu, 15 May 2008 23:48  |
masu
Messages: 378 Registered: February 2006
|
Senior Member |
|
|
I tried to compile with MT flag under FreeBSD and got the above mentioned definition error.
Would it be an alternative to set the recursive flag within Mutex constructor like this:
static pthread_mutex_t sMutexInit = NULL;//PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
Mutex::Mutex()
{
pthread_mutexattr_init(&mutex_attr);
pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&sMutexInit, &mutex_attr);
*mutex = sMutexInit;
}
?
Do you have a reasonable example I can test with?
Matthias
|
|
|
|
Goto Forum:
Current Time: Sun May 11 15:06:30 CEST 2025
Total time taken to generate the page: 0.03022 seconds
|