Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib min_heap: add brief introduction to Min Heap API

A short description of the Min Heap API is added to the min_heap.h,
explaining its purpose for managing min-heaps and emphasizing the use of
macro wrappers instead of direct function calls. For more details, users
are directed to the documentation at Documentation/core-api/min_heap.rst.

Link: https://lkml.kernel.org/r/20241129181222.646855-4-visitorckw@gmail.com
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kuan-Wei Chiu and committed by
Andrew Morton
2ad0546d 93aa1b5c

+11
+11
include/linux/min_heap.h
··· 6 6 #include <linux/string.h> 7 7 #include <linux/types.h> 8 8 9 + /* 10 + * The Min Heap API provides utilities for managing min-heaps, a binary tree 11 + * structure where each node's value is less than or equal to its children's 12 + * values, ensuring the smallest element is at the root. 13 + * 14 + * Users should avoid directly calling functions prefixed with __min_heap_*(). 15 + * Instead, use the provided macro wrappers. 16 + * 17 + * For further details and examples, refer to Documentation/core-api/min_heap.rst. 18 + */ 19 + 9 20 /** 10 21 * Data structure to hold a min-heap. 11 22 * @nr: Number of elements currently in the heap.