Michael Cargile wrote: > 3. Last we checked Asterisk locks were non-reentrant, meaning a single > thread cannot lock on the same lock twice. This is a problem that seems > to be currently being worked on but I am not aware if it has been fixed > as of yet. This means we need to be careful when locking. A deadlock we > fixed was caused by a function locking the one lock, then calling a > function that locks on the same lock.
Asterisk has always required and used recursive (reentrant is not the right word) mutex locks (and now rwlocks, in trunk). All the code in Asterisk that uses locks depends on this behavior and would break badly if the mutexes were not recursive. This is documented in a comment very early in include/asterisk/lock.h, so I'm not sure why you came to the conclusion that non-recursive mutexes were in use. -- Kevin P. Fleming Director of Software Technologies Digium, Inc. - "The Genuine Asterisk Experience" (TM) _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
