diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-04 17:50:21 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-04 17:50:21 +0000 |
commit | cda53172f43b409df7bac54dc62c1c1305ff0b7c (patch) | |
tree | cb050a8999ec407782c1c54d6779aea83ef865ef /include | |
parent | 5b68ca1a7ee10e1ef6428942ac5ad46f50af9eae (diff) |
Fix trunk breakage.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@216551 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/lock.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index a4005d7ca..bfbed1e6f 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -1556,13 +1556,12 @@ static inline int _ast_rwlock_tryrdlock(ast_rwlock_t *t, const char *name, { int res; struct ast_lock_track *lt = &t->track; - int canlog = strcmp(filename, "logger.c") & t->tracking; #ifdef HAVE_BKTR struct ast_bt *bt = NULL; #endif - - #ifdef AST_MUTEX_INIT_W_CONSTRUCTORS + int canlog = strcmp(filename, "logger.c") & t->tracking; + if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) { /* Don't warn abount uninitialized lock. * Simple try to initialize it. @@ -1615,13 +1614,12 @@ static inline int _ast_rwlock_trywrlock(ast_rwlock_t *t, const char *name, { int res; struct ast_lock_track *lt= &t->track; - int canlog = strcmp(filename, "logger.c") & t->tracking; #ifdef HAVE_BKTR struct ast_bt *bt = NULL; #endif - - #ifdef AST_MUTEX_INIT_W_CONSTRUCTORS + int canlog = strcmp(filename, "logger.c") & t->tracking; + if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) { /* Don't warn abount uninitialized lock. * Simple try to initialize it. |