diff options
author | Jason Parker <jparker@digium.com> | 2010-04-22 19:08:01 +0000 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2010-04-22 19:08:01 +0000 |
commit | 9e3f5fa6fbd98d094c3f78b57cf80bcf81ab89d4 (patch) | |
tree | 7d5f10f305e5407fdfc584f251071ca5f299dda6 /main/heap.c | |
parent | a753e8878b8a30122fd5f0af45bad242de0cb303 (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: https://origsvn.digium.com/svn/asterisk/trunk@258557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/heap.c')
-rw-r--r-- | main/heap.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/main/heap.c b/main/heap.c index ace5bc832..30fb4e43e 100644 --- a/main/heap.c +++ b/main/heap.c @@ -302,38 +302,17 @@ 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); -} - -int ast_heap_rdlock(struct ast_heap *h) -{ - return ast_rwlock_rdlock(&h->lock); -} - -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); + 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); + 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); + return __ast_rwlock_unlock(&h->lock, "&h->lock", file, line, func); } - -#endif /* DEBUG_THREADS */ |