aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-15 06:34:29 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-15 06:34:29 +0000
commitff7a44174e155ec30b3f12e0e623c6e1e3b709df (patch)
tree6107d26177c6cafafcd9ccbc5efff6233ddfb555 /include/asterisk
parentc830210dc83b0330ec467ddec09a94e283ce15ef (diff)
Add support to see what holds the lock when doing trylock.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48480 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/lock.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index d2ce09834..75ae4d37b 100644
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -303,8 +303,11 @@ static inline int __ast_pthread_mutex_trylock(const char *filename, int lineno,
t->reentrancy++;
} else {
__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n",
- filename, lineno, func, mutex_name);
+ filename, lineno, func, mutex_name);
}
+ } else {
+ __ast_mutex_logger("%s line %d (%s): Error: '%s' was locked here.\n",
+ t->file[t->reentrancy-1], t->lineno[t->reentrancy-1], t->func[t->reentrancy-1], mutex_name);
}
return res;