From: Russell Bryant Date: Tue, 28 Aug 2007 19:12:53 +0000 (+0000) Subject: Change the audiohook lock and unlock wrappers to macros instead of inline X-Git-Tag: 1.6.0-beta1~3^2~1597 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c708fdef4d2b188bc768af8e99e8e4901c63551;p=thirdparty%2Fasterisk.git 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 --- 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) }