These are not supposed to be exposed by the shared library, so make them
hidden.
Change-Id: If1f728f1b536d1be1e38dfff8ca2aba8d4bd1868
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2404
Tested-by: jenkins <jenkins@lttng.org>
*
* Returns -ENOMEM if out of memory.
*/
*
* Returns -ENOMEM if out of memory.
*/
extern int bt_heap_init(struct ptr_heap *heap,
size_t alloc_len,
int gt(void *a, void *b));
extern int bt_heap_init(struct ptr_heap *heap,
size_t alloc_len,
int gt(void *a, void *b));
* bt_heap_free - free the heap
* @heap: the heap to free
*/
* bt_heap_free - free the heap
* @heap: the heap to free
*/
extern void bt_heap_free(struct ptr_heap *heap);
/**
extern void bt_heap_free(struct ptr_heap *heap);
/**
*
* Returns -ENOMEM if out of memory.
*/
*
* Returns -ENOMEM if out of memory.
*/
extern int bt_heap_insert(struct ptr_heap *heap, void *p);
/**
extern int bt_heap_insert(struct ptr_heap *heap, void *p);
/**
* Returns the largest element in the heap. It removes this element from the
* heap. Returns NULL if the heap is empty.
*/
* Returns the largest element in the heap. It removes this element from the
* heap. Returns NULL if the heap is empty.
*/
extern void *bt_heap_remove(struct ptr_heap *heap);
/**
extern void *bt_heap_remove(struct ptr_heap *heap);
/**
* return NULL. This algorithm has a complexity of O(n), which is higher than
* O(log(n)) provided by the rest of this API.
*/
* return NULL. This algorithm has a complexity of O(n), which is higher than
* O(log(n)) provided by the rest of this API.
*/
extern void *bt_heap_cherrypick(struct ptr_heap *heap, void *p);
/**
extern void *bt_heap_cherrypick(struct ptr_heap *heap, void *p);
/**
* This is the equivalent of calling bt_heap_remove() and then bt_heap_insert(), but
* it only rebalances the heap once. It never allocates memory.
*/
* This is the equivalent of calling bt_heap_remove() and then bt_heap_insert(), but
* it only rebalances the heap once. It never allocates memory.
*/
extern void *bt_heap_replace_max(struct ptr_heap *heap, void *p);
/**
extern void *bt_heap_replace_max(struct ptr_heap *heap, void *p);
/**
*
* Returns -ENOMEM if out of memory.
*/
*
* Returns -ENOMEM if out of memory.
*/
extern int bt_heap_copy(struct ptr_heap *dst, struct ptr_heap *src);
#endif /* _BABELTRACE_PRIO_HEAP_H */
extern int bt_heap_copy(struct ptr_heap *dst, struct ptr_heap *src);
#endif /* _BABELTRACE_PRIO_HEAP_H */