diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-05-29 17:39:50 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-05-29 17:39:50 +0000 |
commit | 5a50f0e4414b4e13e6b519b2e34efc18ab26774e (patch) | |
tree | 26b2e0c9c5feb4dd4e03dfe264f1a42c48c411e2 /include | |
parent | 6e5d843a719d87dc2b3833347fde404c4c228b77 (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: https://origsvn.digium.com/svn/asterisk/trunk@118957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-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) |