diff options
author | Russell Bryant <russell@russellbryant.com> | 2007-08-28 19:12:53 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2007-08-28 19:12:53 +0000 |
commit | 2c708fdef4d2b188bc768af8e99e8e4901c63551 (patch) | |
tree | 4e43468fbe51d622df37613e747807dd588d7341 /include/asterisk/audiohook.h | |
parent | 2f4a2811b6f7033983cbd00c6f5cb4d4585e3146 (diff) |
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
Diffstat (limited to 'include/asterisk/audiohook.h')
-rw-r--r-- | include/asterisk/audiohook.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h index a374a630a..a80ff31ed 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) } |