aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/lock.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-01 00:05:47 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-01 00:05:47 +0000
commitb4faf23395744b4043d6029ea9d4df2a7538912e (patch)
treeb724cac00f60ab169c2143b540255deda9b7211a /include/asterisk/lock.h
parent77b3a75a4935f3c3a78b7c355a0af278d4bcdde8 (diff)
eliminate spurious warnings
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6478 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/lock.h')
-rwxr-xr-xinclude/asterisk/lock.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index da261b83d..9353ab63a 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",