From 5656c244aba78f81bcb61f081907b09d7451b765 Mon Sep 17 00:00:00 2001 From: qwell Date: Thu, 25 Mar 2010 20:03:59 +0000 Subject: Fix DEBUG_THREADS issue with out-of-tree modules. Take 2, without ABI breakage this time. Review: https://reviewboard.asterisk.org/r/588/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@254717 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/astobj2.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'include/asterisk') diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h index 0c780a26d..3b605720a 100644 --- a/include/asterisk/astobj2.h +++ b/include/asterisk/astobj2.h @@ -467,11 +467,10 @@ int _ao2_ref(void *o, int delta); * \param a A pointer to the object we want to lock. * \return 0 on success, other values on error. */ -#ifndef DEBUG_THREADS int ao2_lock(void *a); -#else -#define ao2_lock(a) _ao2_lock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a) int _ao2_lock(void *a, const char *file, const char *func, int line, const char *var); +#ifdef DEBUG_THREADS +#define ao2_lock(a) _ao2_lock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a) #endif /*! \brief @@ -480,11 +479,10 @@ int _ao2_lock(void *a, const char *file, const char *func, int line, const char * \param a A pointer to the object we want unlock. * \return 0 on success, other values on error. */ -#ifndef DEBUG_THREADS int ao2_unlock(void *a); -#else -#define ao2_unlock(a) _ao2_unlock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a) int _ao2_unlock(void *a, const char *file, const char *func, int line, const char *var); +#ifdef DEBUG_THREADS +#define ao2_unlock(a) _ao2_unlock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a) #endif /*! \brief @@ -493,11 +491,10 @@ int _ao2_unlock(void *a, const char *file, const char *func, int line, const cha * \param a A pointer to the object we want to lock. * \return 0 on success, other values on error. */ -#ifndef DEBUG_THREADS int ao2_trylock(void *a); -#else -#define ao2_trylock(a) _ao2_trylock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a) int _ao2_trylock(void *a, const char *file, const char *func, int line, const char *var); +#ifdef DEBUG_THREADS +#define ao2_trylock(a) _ao2_trylock(a, __FILE__, __PRETTY_FUNCTION__, __LINE__, #a) #endif /*! -- cgit v1.2.3