Change the audiohook lock and unlock wrappers to macros instead of inline
authorRussell Bryant <russell@russellbryant.com>
Tue, 28 Aug 2007 19:12:53 +0000 (19:12 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 28 Aug 2007 19:12:53 +0000 (19:12 +0000)
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

index a374a63..a80ff31 100644 (file)
@@ -165,18 +165,12 @@ void ast_audiohook_trigger_wait(struct ast_audiohook *audiohook);
 /*! \brief Lock an audiohook
  * \param audiohook Audiohook structure
  */
 /*! \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
  */
 
 /*! \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)
 }
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }