[Asterisk-Dev] lock.h change on 10-28 (rev 1.39) means you can never use pthread_mutex_t?

Kevin P. Fleming kpfleming at digium.com
Tue Nov 1 09:20:40 MST 2005


Dinesh Nair wrote:

> perhaps it wont be at some point in the future, and this will ensure 
> that everyone uses ast_mutex_t instead of directly using pthread_mutex_t.

This was done for two reasons... consistency, and to allow DEBUG_THREADS
to be used even when external modules are being built against Asterisk
headers and then loaded. Previously, if an external module was used that
was compiled using pthread_mutex_t but the rest of Asterisk was
expecting those items to be ast_mutex_t (and DEBUG_THREADS was turned
on), bad things would happen.




More information about the asterisk-dev mailing list