diff options
Diffstat (limited to 'include/asterisk/lock.h')
-rw-r--r-- | include/asterisk/lock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index 5a9bc252f..9e3f3d697 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -1148,6 +1148,11 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *lock, const char *name, #else /* !DEBUG_THREADS */ +#define DEADLOCK_AVOIDANCE(lock) \ + ast_mutex_lock(lock); \ + usleep(1); \ + ast_mutex_unlock(lock); + typedef pthread_mutex_t ast_mutex_t; #define AST_MUTEX_INIT_VALUE ((ast_mutex_t) PTHREAD_MUTEX_INIT_VALUE) |