diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-29 17:39:50 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-29 17:39:50 +0000 |
commit | 47d9455153a8b99bc632081a44cfe1dc7d25a26a (patch) | |
tree | 26b2e0c9c5feb4dd4e03dfe264f1a42c48c411e2 /include/asterisk/lock.h | |
parent | 3db76e85a49901a2049ec3d430685d5c32f7aeba (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@118957 f38db490-d61c-443f-a65b-d21fe96a405b
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) |