A change to the way channel locks are handled when DEBUG_CHANNEL_LOCKS is defined.
commitd56f3470b38895f573b3f1e1a406b8fedda10fc7
authormmichelson <mmichelson@614ede4d-c843-0410-af14-a771ab80d22e>
Tue, 13 May 2008 23:47:49 +0000 (13 23:47 +0000)
committermmichelson <mmichelson@614ede4d-c843-0410-af14-a771ab80d22e>
Tue, 13 May 2008 23:47:49 +0000 (13 23:47 +0000)
tree2734bfb5d029a6ef36dc422c19803fc886f057a5
parent18a61ee8a6269241ebf6c0508e6483505da9827e
A change to the way channel locks are handled when DEBUG_CHANNEL_LOCKS is defined.

After debugging a deadlock, it was noticed that when DEBUG_CHANNEL_LOCKS
is enabled in menuselect, the actual origin of channel locks is obscured
by the fact that all channel locks appear to happen in the function
ast_channel_lock(). This code change redefines ast_channel_lock to be a
macro which maps to __ast_channel_lock(), which then relays the proper
file name, line number, and function name information to the core lock
functions so that this information will be displayed in the case that
there is some sort of locking error or core show locks is issued.

git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116088 614ede4d-c843-0410-af14-a771ab80d22e
include/asterisk/lock.h
main/channel.c