|
|
|
@ -209,6 +209,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
|
|
|
|
|
*
|
|
|
|
@ -247,6 +249,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
|
|
|
|
|
*
|
|
|
|
|