From 5a50f0e4414b4e13e6b519b2e34efc18ab26774e Mon Sep 17 00:00:00 2001
From: Tilghman Lesher <tilghman@meg.abyt.es>
Date: Thu, 29 May 2008 17:39:50 +0000
Subject: [PATCH] Merged revisions 118954 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118954 | tilghman | 2008-05-29 12:33:01 -0500 (Thu, 29 May 2008) | 2 lines

Define also when not DEBUG_THREADS

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 include/asterisk/lock.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 5a9bc252ff..9e3f3d6979 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)
-- 
GitLab