Merged revisions 118954 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 29 May 2008 17:39:50 +0000 (17:39 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 29 May 2008 17:39:50 +0000 (17:39 +0000)
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

index 5a9bc25..9e3f3d6 100644 (file)
@@ -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)