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
This commit is contained in:
Russell Bryant
2006-08-14 03:24:06 +00:00
parent 2f2cce01d2
commit 9ad9e42c3e
3 changed files with 129 additions and 4 deletions

View File

@@ -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);