diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-27 01:36:42 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-27 01:36:42 +0000 |
commit | 04e3d952a1ce7b8c434ae72e7e44cecc9290a429 (patch) | |
tree | cb04715c2805112af284389de641669601ade34a /include | |
parent | d799f53155f3958f6b5fabe9b4d60d1f87a07240 (diff) |
Merged revisions 184512 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r184512 | russell | 2009-03-26 20:35:56 -0500 (Thu, 26 Mar 2009) | 2 lines
Pass more useful information through to lock tracking when DEBUG_THREADS is on.
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@184513 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/heap.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asterisk/heap.h b/include/asterisk/heap.h index 56311ca05..b19dee1e3 100644 --- a/include/asterisk/heap.h +++ b/include/asterisk/heap.h @@ -198,6 +198,8 @@ 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 * @@ -236,6 +238,17 @@ int ast_heap_rdlock(struct ast_heap *h); */ int ast_heap_unlock(struct ast_heap *h); +#else /* DEBUG_THREADS */ + +#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 * |