aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-25 19:59:04 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-25 19:59:04 +0000
commitea8765368340919f16d3ee2f84700ef8093b4bdf (patch)
tree22295f0920143f7ea98d9abb961cb8b750ec6267 /include
parent17ea17bd58e67fb5deada667228307543cb0d38f (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.0@254716 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 22270c19a..822f4ba4d 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -192,11 +192,10 @@ int ao2_ref(void *o, int delta);
* \param a A pointer to the object we want 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
@@ -205,11 +204,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
@@ -218,11 +216,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
/*!