[asterisk-dev] Re: deadlock in ast_custom_function_register?

Russell Bryant russell at digium.com
Tue Oct 24 10:04:00 MST 2006


----- Tony Mountifield <tony at softins.clara.co.uk> wrote:
> Asterisk relies on using recursive mutexes. If a process tries to
> lock a mutex that it has already locked, it will succeed, and the "lock
> count" of the mutex will be incremented. When it unlocks the mutex, the lock
> count will be decremented. When this count reaches zero, the mutex
> will really be unlocked and available for another process to lock.

Well, if you replace "process" with "thread" in what you have said,
that is exactly correct.  :)

-- 
Russell Bryant
Software Engineer
Digium, Inc.



More information about the asterisk-dev mailing list