aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/pbx.h
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-14 03:24:06 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-14 03:24:06 +0000
commit19758a4ffd5da144f993d1c9da1fb3fba7977275 (patch)
tree6bec17b6469b3b443b8911637f0c5eec61181b32 /include/asterisk/pbx.h
parent02ed9fcda9904ece63bbd064327993ef542c61fd (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: http://svn.digium.com/svn/asterisk/trunk@39681 f38db490-d61c-443f-a65b-d21fe96a405b
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);