apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Jen <henry...@ztune.net>
Subject Recursive mutex
Date Thu, 21 Jul 2005 01:26:55 GMT
Hi,

I need to have recursive(NESTED) mutex support in our project.

Currently apr is relying on pthread lib to provide 
pthread_mutexattr_settype to provide recursive support, unfortunately, 
that does not seem to be in POSIX standard and is not available on the 
requested linux platform(see 
http://www.lynuxworks.com/products/posix/function-calls.php3).

I plan to implement that in apr by extend current apr_thread_mutex_t to 
include a pthread_t and an integer for count, and modify the lock/unlock 
accordingly. So here are couple questions:

1. Is this a reasonable solution or I overlook something? Or maybe 
someone had done similar?

2. How fast can this modification can be rolled into a formal apr 
release? It is going to be API compatible but not ABI(as the structure 
changed, only in the case of underlying pthread lib does not support 
recursive mutex, so should be OK)

Cheers,
Henry




Mime
View raw message