mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@184513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
20
main/heap.c
20
main/heap.c
@@ -267,6 +267,8 @@ size_t ast_heap_size(struct ast_heap *h)
|
||||
return h->cur_len;
|
||||
}
|
||||
|
||||
#ifndef DEBUG_THREADS
|
||||
|
||||
int ast_heap_wrlock(struct ast_heap *h)
|
||||
{
|
||||
return ast_rwlock_wrlock(&h->lock);
|
||||
@@ -282,3 +284,21 @@ int ast_heap_unlock(struct ast_heap *h)
|
||||
return ast_rwlock_unlock(&h->lock);
|
||||
}
|
||||
|
||||
#else /* DEBUG_THREADS */
|
||||
|
||||
int __ast_heap_wrlock(struct ast_heap *h, const char *file, const char *func, int line)
|
||||
{
|
||||
return _ast_rwlock_wrlock(&h->lock, "&h->lock", file, line, func);
|
||||
}
|
||||
|
||||
int __ast_heap_rdlock(struct ast_heap *h, const char *file, const char *func, int line)
|
||||
{
|
||||
return _ast_rwlock_rdlock(&h->lock, "&h->lock", file, line, func);
|
||||
}
|
||||
|
||||
int __ast_heap_unlock(struct ast_heap *h, const char *file, const char *func, int line)
|
||||
{
|
||||
return _ast_rwlock_unlock(&h->lock, "&h->lock", file, line, func);
|
||||
}
|
||||
|
||||
#endif /* DEBUG_THREADS */
|
||||
|
||||
Reference in New Issue
Block a user