From 2c708fdef4d2b188bc768af8e99e8e4901c63551 Mon Sep 17 00:00:00 2001 From: Russell Bryant <russell@russellbryant.com> Date: Tue, 28 Aug 2007 19:12:53 +0000 Subject: [PATCH] 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 --- include/asterisk/audiohook.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h index a374a630ab..a80ff31eda 100644 --- a/include/asterisk/audiohook.h +++ b/include/asterisk/audiohook.h @@ -165,18 +165,12 @@ void ast_audiohook_trigger_wait(struct ast_audiohook *audiohook); /*! \brief Lock an audiohook * \param audiohook Audiohook structure */ -static inline int ast_audiohook_lock(struct ast_audiohook *audiohook) -{ - return ast_mutex_lock(&audiohook->lock); -} +#define ast_audiohook_lock(ah) ast_mutex_lock(&(ah)->lock) /*! \brief Unlock an audiohook * \param audiohook Audiohook structure */ -static inline int ast_audiohook_unlock(struct ast_audiohook *audiohook) -{ - return ast_mutex_unlock(&audiohook->lock); -} +#define ast_audiohook_unlock(ah) ast_mutex_unlock(&(ah)->lock) #if defined(__cplusplus) || defined(c_plusplus) } -- GitLab