summaryrefslogtreecommitdiffstats
path: root/lib/test_min_heap.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: Introduce generic min-heapIan Rogers2020-03-061-0/+194
Supports push, pop and converting an array into a heap. If the sense of the compare function is inverted then it can provide a max-heap. Based-on-work-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/20200214075133.181299-3-irogers@google.com