> Original pthread implementations didn't support recursion so
> OpenThreads was built around this. These days would could probably
> safely enable it and deprecate the ReentrantMutex which won't be as
> efficient as using pthreads.


Either that or make the Reentrant Mutex enable the support rather than have its 
own solution.  The one issue I found with doing it that way is in the pthread 
docs:



> 
>  APPLICATION USAGE
> 
>     It is advised that an application should not use a 
> PTHREAD_MUTEX_RECURSIVE mutex with condition variables because the implicit 
> unlock performed for a pthread_cond_wait() or pthread_cond_timedwait() may 
> not actually release the mutex (if it had been locked multiple times). If 
> this happens, no other thread can satisfy the condition of the predicate. 
> 


Is that the same with a critical section?  If not, is there a way to force a 
complete unlock on a recursive pthread mutex?

David Guthrie

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=11700#11700





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to