From: Kevin P. Fleming Date: Thu, 1 Sep 2005 00:05:47 +0000 (+0000) Subject: eliminate spurious warnings X-Git-Tag: 1.2.0-beta2~434 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fc91dd1035f5f33f14b397c89b79f11bb91ca079;p=thirdparty%2Fasterisk.git eliminate spurious warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6478 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index da261b83db..9353ab63a3 100755 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -295,7 +295,7 @@ static inline int __ast_pthread_mutex_unlock(const char *filename, int lineno, c } #endif - if (t->thread != pthread_self()) { + if (t->reentrancy && (t->thread != pthread_self())) { __ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n", filename, lineno, func, mutex_name); __ast_mutex_logger("%s line %d (%s): '%s' was locked here.\n", @@ -342,7 +342,7 @@ static inline int __ast_pthread_cond_wait(const char *filename, int lineno, cons } #endif - if (t->thread != pthread_self()) { + if (t->reentrancy && (t->thread != pthread_self())) { __ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n", filename, lineno, func, mutex_name); __ast_mutex_logger("%s line %d (%s): '%s' was locked here.\n", @@ -396,7 +396,7 @@ static inline int __ast_pthread_cond_timedwait(const char *filename, int lineno, } #endif - if (t->thread != pthread_self()) { + if (t->reentrancy && (t->thread != pthread_self())) { __ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n", filename, lineno, func, mutex_name); __ast_mutex_logger("%s line %d (%s): '%s' was locked here.\n",