Merge tag 'timers_urgent_for_v6.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[drm/drm-misc.git] / lib / min_heap.c
blob4485372ff3b1cecc7aa8d8628f9f68becab9415e
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/export.h>
3 #include <linux/min_heap.h>
5 void __min_heap_init(min_heap_char *heap, void *data, int size)
7 __min_heap_init_inline(heap, data, size);
9 EXPORT_SYMBOL(__min_heap_init);
11 void *__min_heap_peek(struct min_heap_char *heap)
13 return __min_heap_peek_inline(heap);
15 EXPORT_SYMBOL(__min_heap_peek);
17 bool __min_heap_full(min_heap_char *heap)
19 return __min_heap_full_inline(heap);
21 EXPORT_SYMBOL(__min_heap_full);
23 void __min_heap_sift_down(min_heap_char *heap, int pos, size_t elem_size,
24 const struct min_heap_callbacks *func, void *args)
26 __min_heap_sift_down_inline(heap, pos, elem_size, func, args);
28 EXPORT_SYMBOL(__min_heap_sift_down);
30 void __min_heap_sift_up(min_heap_char *heap, size_t elem_size, size_t idx,
31 const struct min_heap_callbacks *func, void *args)
33 __min_heap_sift_up_inline(heap, elem_size, idx, func, args);
35 EXPORT_SYMBOL(__min_heap_sift_up);
37 void __min_heapify_all(min_heap_char *heap, size_t elem_size,
38 const struct min_heap_callbacks *func, void *args)
40 __min_heapify_all_inline(heap, elem_size, func, args);
42 EXPORT_SYMBOL(__min_heapify_all);
44 bool __min_heap_pop(min_heap_char *heap, size_t elem_size,
45 const struct min_heap_callbacks *func, void *args)
47 return __min_heap_pop_inline(heap, elem_size, func, args);
49 EXPORT_SYMBOL(__min_heap_pop);
51 void __min_heap_pop_push(min_heap_char *heap, const void *element, size_t elem_size,
52 const struct min_heap_callbacks *func, void *args)
54 __min_heap_pop_push_inline(heap, element, elem_size, func, args);
56 EXPORT_SYMBOL(__min_heap_pop_push);
58 bool __min_heap_push(min_heap_char *heap, const void *element, size_t elem_size,
59 const struct min_heap_callbacks *func, void *args)
61 return __min_heap_push_inline(heap, element, elem_size, func, args);
63 EXPORT_SYMBOL(__min_heap_push);
65 bool __min_heap_del(min_heap_char *heap, size_t elem_size, size_t idx,
66 const struct min_heap_callbacks *func, void *args)
68 return __min_heap_del_inline(heap, elem_size, idx, func, args);
70 EXPORT_SYMBOL(__min_heap_del);