From: Joshua Colp Date: Fri, 15 Dec 2006 06:34:29 +0000 (+0000) Subject: Add support to see what holds the lock when doing trylock. X-Git-Tag: 1.6.0-beta1~3^2~3732 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbe0a579b24222527d61a0cd308d2efddfef5d7d;p=thirdparty%2Fasterisk.git Add support to see what holds the lock when doing trylock. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48480 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index d2ce098345..75ae4d37b9 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;