diff options
author | Ian Rogers <irogers@google.com> | 2020-02-13 23:51:29 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-03-06 11:56:59 +0100 |
commit | 6e24628d78e4785385876125cba62315ca3b04b9 (patch) | |
tree | 4b59f1aa6c459cb20c31008bb93599d3731c4732 /lib/Kconfig.debug | |
parent | 98add2af89bbfe8241e189b490fd91e5751c7900 (diff) |
lib: Introduce generic min-heap
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
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r-- | lib/Kconfig.debug | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 69def4a9df00..f04b61c1a1cc 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1769,6 +1769,16 @@ config TEST_LIST_SORT If unsure, say N. +config TEST_MIN_HEAP + tristate "Min heap test" + depends on DEBUG_KERNEL || m + help + Enable this to turn on min heap function tests. This test is + executed only once during system boot (so affects only boot time), + or at module load time. + + If unsure, say N. + config TEST_SORT tristate "Array-based sort test" depends on DEBUG_KERNEL || m |