Skip to content
Snippets Groups Projects
Commit bbe0a579 authored by Joshua Colp's avatar Joshua Colp
Browse files

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
parent 315f8bb1
Branches
Tags
No related merge requests found
...@@ -303,8 +303,11 @@ static inline int __ast_pthread_mutex_trylock(const char *filename, int lineno, ...@@ -303,8 +303,11 @@ static inline int __ast_pthread_mutex_trylock(const char *filename, int lineno,
t->reentrancy++; t->reentrancy++;
} else { } else {
__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n", __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; return res;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment