mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
Change the audiohook lock and unlock wrappers to macros instead of inline
functions. As inline functions, the lock debug information will show that these are always locked in audiohooks.h instead of the file where the lock was actually acquired. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -165,18 +165,12 @@ void ast_audiohook_trigger_wait(struct ast_audiohook *audiohook);
|
|||||||
/*! \brief Lock an audiohook
|
/*! \brief Lock an audiohook
|
||||||
* \param audiohook Audiohook structure
|
* \param audiohook Audiohook structure
|
||||||
*/
|
*/
|
||||||
static inline int ast_audiohook_lock(struct ast_audiohook *audiohook)
|
#define ast_audiohook_lock(ah) ast_mutex_lock(&(ah)->lock)
|
||||||
{
|
|
||||||
return ast_mutex_lock(&audiohook->lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! \brief Unlock an audiohook
|
/*! \brief Unlock an audiohook
|
||||||
* \param audiohook Audiohook structure
|
* \param audiohook Audiohook structure
|
||||||
*/
|
*/
|
||||||
static inline int ast_audiohook_unlock(struct ast_audiohook *audiohook)
|
#define ast_audiohook_unlock(ah) ast_mutex_unlock(&(ah)->lock)
|
||||||
{
|
|
||||||
return ast_mutex_unlock(&audiohook->lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(__cplusplus) || defined(c_plusplus)
|
#if defined(__cplusplus) || defined(c_plusplus)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user