diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index 475e49a998dc6acbdeece98eeff9a6e5a1796877..33af5640580608432e7f126feb40f88f99685f4e 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -1469,14 +1469,14 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *t, 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); #define DLA_UNLOCK(lock) ast_mutex_unlock(lock)