Fix a bug in the rwlock tracking. ast_rwlock_unlock did not take into
authorMark Michelson <mmichelson@digium.com>
Wed, 25 Jun 2008 22:25:20 +0000 (22:25 +0000)
committerMark Michelson <mmichelson@digium.com>
Wed, 25 Jun 2008 22:25:20 +0000 (22:25 +0000)
commit222685d4026ee481f7fbc0b8d9528ecc3e3aef0b
tree32f13c0d80f4b8d22ee4cd815f07ad24d5e08fc6
parent9ba79e3b685ccf1bce94258be391b811d000c6a8
Fix a bug in the rwlock tracking. ast_rwlock_unlock did not take into
account that multiple threads could hold the same rdlock at the same time.
As such, it expected that when a thread released a lock that it must have
been the last to acquire the lock as well. Erroneous error messages would
be sent to the console stating that a thread was attempting to unlock a lock
it did not own.

Now all threads are examined to be sure that the message is only printed
when it is supposed to be printed.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/lock.h