[asterisk-commits] russell: trunk r81264 - /trunk/include/asterisk/audiohook.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 28 14:12:53 CDT 2007
Author: russell
Date: Tue Aug 28 14:12:53 2007
New Revision: 81264
URL: http://svn.digium.com/view/asterisk?view=rev&rev=81264
Log:
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.
Modified:
trunk/include/asterisk/audiohook.h
Modified: trunk/include/asterisk/audiohook.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/audiohook.h?view=diff&rev=81264&r1=81263&r2=81264
==============================================================================
--- trunk/include/asterisk/audiohook.h (original)
+++ trunk/include/asterisk/audiohook.h Tue Aug 28 14:12:53 2007
@@ -165,18 +165,12 @@
/*! \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)
}
More information about the asterisk-commits
mailing list