aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-25 20:27:24 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-25 20:27:24 +0000
commitee293a4c724582583fadecea84940a723a417bfc (patch)
treea369531dc362fc7f1706efe1d956008993d5bcf5 /include
parent02cd07c96274188dc7f0a5493cd232f911edea1b (diff)
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.2@254770 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/astobj2.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index 591e1fa00..8ef6985c7 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -472,11 +472,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
@@ -485,11 +484,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
@@ -498,11 +496,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
/*!