summaryrefslogtreecommitdiff
path: root/include/asterisk/pbx.h
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-08-14 03:24:06 +0000
committerRussell Bryant <russell@russellbryant.com>2006-08-14 03:24:06 +0000
commit9ad9e42c3e0bf9e356b3420abc056094c206e7a4 (patch)
tree6bec17b6469b3b443b8911637f0c5eec61181b32 /include/asterisk/pbx.h
parent2f2cce01d252e6cff1f27cfe74912c3598dd7c0b (diff)
add MacroExclusive application, a Macro that only one call can executed at
a time (issue #7366, Steve Davies, with mods by me as discussed in the report) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/pbx.h')
-rw-r--r--include/asterisk/pbx.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 8212d7cc0..397c49d76 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -681,6 +681,29 @@ int ast_lock_context(struct ast_context *con);
*/
int ast_unlock_context(struct ast_context *con);
+/*!
+ * \brief locks the macrolock in the given given context
+ *
+ * \param macrocontext name of the macro-context to lock
+ *
+ * Locks the given macro-context to ensure only one thread (call) can execute it at a time
+ *
+ * \retval 0 on success
+ * \retval -1 on failure
+ */
+int ast_context_lockmacro(const char *macrocontext);
+
+/*!
+ * \brief Unlocks the macrolock in the given context
+ *
+ * \param macrocontext name of the macro-context to unlock
+ *
+ * Unlocks the given macro-context so that another thread (call) can execute it
+ *
+ * \retval 0 on success
+ * \retval -1 on failure
+ */
+int ast_context_unlockmacro(const char *macrocontext);
int ast_async_goto(struct ast_channel *chan, const char *context, const char *exten, int priority);