diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-22 19:08:01 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-22 19:08:01 +0000 |
commit | 8d07966e391238ae14e24d143731ac4b4fd8d9c7 (patch) | |
tree | 7d5f10f305e5407fdfc584f251071ca5f299dda6 /include/asterisk/heap.h | |
parent | 2b551e72e492fbdb71e3439bf15c50f88f0a3733 (diff) |
Remove ABI differences that occured when compiling with DEBUG_THREADS.
"Bad Things" would happen if Asterisk was compiled with DEBUG_THREADS, but a
loaded module was not (or vice versa). This also immensely simplifies the
lock code, since there are no longer 2 separate versions of them.
Review: https://reviewboard.asterisk.org/r/508/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@258557 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/heap.h')
-rw-r--r-- | include/asterisk/heap.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/include/asterisk/heap.h b/include/asterisk/heap.h index 6bf97b4f3..86f4e3d5c 100644 --- a/include/asterisk/heap.h +++ b/include/asterisk/heap.h @@ -209,8 +209,6 @@ void *ast_heap_peek(struct ast_heap *h, unsigned int index); */ size_t ast_heap_size(struct ast_heap *h); -#ifndef DEBUG_THREADS - /*! * \brief Write-Lock a heap * @@ -223,7 +221,7 @@ size_t ast_heap_size(struct ast_heap *h); * \return see the documentation for pthread_rwlock_wrlock() * \since 1.6.1 */ -int ast_heap_wrlock(struct ast_heap *h); +int __ast_heap_wrlock(struct ast_heap *h, const char *file, const char *func, int line); /*! * \brief Read-Lock a heap @@ -237,7 +235,7 @@ int ast_heap_wrlock(struct ast_heap *h); * \return see the documentation for pthread_rwlock_rdlock() * \since 1.6.1 */ -int ast_heap_rdlock(struct ast_heap *h); +int __ast_heap_rdlock(struct ast_heap *h, const char *file, const char *func, int line); /*! * \brief Unlock a heap @@ -247,18 +245,11 @@ int ast_heap_rdlock(struct ast_heap *h); * \return see the documentation for pthread_rwlock_unlock() * \since 1.6.1 */ -int ast_heap_unlock(struct ast_heap *h); - -#else /* DEBUG_THREADS */ +int __ast_heap_unlock(struct ast_heap *h, const char *file, const char *func, int line); #define ast_heap_wrlock(h) __ast_heap_wrlock(h, __FILE__, __PRETTY_FUNCTION__, __LINE__) -int __ast_heap_wrlock(struct ast_heap *h, const char *file, const char *func, int line); #define ast_heap_rdlock(h) __ast_heap_rdlock(h, __FILE__, __PRETTY_FUNCTION__, __LINE__) -int __ast_heap_rdlock(struct ast_heap *h, const char *file, const char *func, int line); #define ast_heap_unlock(h) __ast_heap_unlock(h, __FILE__, __PRETTY_FUNCTION__, __LINE__) -int __ast_heap_unlock(struct ast_heap *h, const char *file, const char *func, int line); - -#endif /* DEBUG_THREADS */ /*! * \brief Verify that a heap has been properly constructed |