aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-25 19:39:23 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-25 19:39:23 +0000
commitbc49afad0901b61eb23a054f06098f16b8d72eae (patch)
tree0f67ad4658bb271c4ab36012d186bec82a8edbe0 /include
parent28e34f474cd2f309e8a66eb3a23c9850f3f5c091 (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.4@254714 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 b9d814e9f..20621e2e8 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -185,18 +185,16 @@ 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
-#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
/*!
@@ -205,11 +203,10 @@ int __ao2_trylock(void *a, const char *file, const char *func, int line, const c
* \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
/*!