Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
masu is currently offline  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
 
Read Message
Read Message
Previous Topic: MT/Locking Questions
Next Topic: Interprocess communication with U++
Goto Forum:
  


Current Time: Thu Mar 28 15:20:52 CET 2024

Total time taken to generate the page: 0.01679 seconds