summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2013-08-15 12:12:26 +0000
committerKinsey Moore <kmoore@digium.com>2013-08-15 12:12:26 +0000
commit3f46d461bf294a7047a370255adaddbc67006723 (patch)
treeebc404815ee3af99d598cf795dffbeecffa15440 /include
parente9ac63f9a99d29f1a7c8e966dcb9d187b85900dc (diff)
Fix deadlocks in chan_sip in REFER and BYE handling
This resolves several deadlocks in chan_sip relating to usage of ast_channel_bridge_peer and improves accessibility of lock debugging function calls. Review: https://reviewboard.asterisk.org/r/2756/ (closes issue ASTERISK-22215) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/lock.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 6ede7de50..34e944476 100644
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -316,7 +316,22 @@ static inline void __dump_backtrace(struct ast_bt *bt, int canlog)
* \param this_lock_addr lock address to return lock information
* \since 1.6.1
*/
-void log_show_lock(void *this_lock_addr);
+void ast_log_show_lock(void *this_lock_addr);
+
+/*!
+ * \brief Generate a lock dump equivalent to "core show locks".
+ *
+ * The lock dump generated is generally too large to be output by a
+ * single ast_verbose/log/debug/etc. call. Only ast_cli() handles it
+ * properly without changing BUFSIZ in logger.c.
+ *
+ * Note: This must be ast_free()d when you're done with it.
+ *
+ * \retval An ast_str containing the lock dump
+ * \retval NULL on error
+ * \since 12
+ */
+struct ast_str *ast_dump_locks(void);
/*!
* \brief retrieve lock info for the specified mutex