diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-30 16:09:52 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-30 16:09:52 +0000 |
commit | 218580c1e2b7c2adffdd6f506d132e6aa37c76e9 (patch) | |
tree | 44ab86a50f2871229b515eb1c9cadfaf755378e2 /include | |
parent | c85f077371523407627e844315d8976a77a21078 (diff) |
Merged revisions 126574 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r126574 | russell | 2008-06-30 11:07:25 -0500 (Mon, 30 Jun 2008) | 18 lines
Merged revisions 126573 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r126573 | russell | 2008-06-30 11:05:08 -0500 (Mon, 30 Jun 2008) | 10 lines
Fix a typo in the non-DEBUG_THREADS version of the recently added DEADLOCK_AVOIDANCE()
macro. This caused the lock to not actually be released, and as a result, not
avoid deadlocks at all. This resolves the issues reported in the last while about
Asterisk locking up all over the place (and most commonly, in chan_iax2).
(closes issue #12927)
(closes issue #12940)
(closes issue #12925)
(potentially closes others ...)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@126575 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/lock.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index 060ddfdcb..d6313bbe6 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -1082,14 +1082,14 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *lock, const char *name, #else /* !DEBUG_THREADS */ #define CHANNEL_DEADLOCK_AVOIDANCE(chan) \ - ast_channel_lock(chan); \ + ast_channel_unlock(chan); \ usleep(1); \ - ast_channel_unlock(chan); + ast_channel_lock(chan); #define DEADLOCK_AVOIDANCE(lock) \ - ast_mutex_lock(lock); \ + ast_mutex_unlock(lock); \ usleep(1); \ - ast_mutex_unlock(lock); + ast_mutex_lock(lock); static inline int ast_rwlock_init(ast_rwlock_t *prwlock) { |