[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241129181222.646855-4-visitorckw@gmail.com>
Date: Sat, 30 Nov 2024 02:12:21 +0800
From: Kuan-Wei Chiu <visitorckw@...il.com>
To: akpm@...ux-foundation.org,
corbet@....net
Cc: geert@...ux-m68k.org,
jserv@...s.ncku.edu.tw,
linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org,
Kuan-Wei Chiu <visitorckw@...il.com>
Subject: [PATCH 3/4] 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.
Signed-off-by: Kuan-Wei Chiu <visitorckw@...il.com>
---
include/linux/min_heap.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/linux/min_heap.h b/include/linux/min_heap.h
index 456cfbc1b8f5..55bfe670bbb9 100644
--- a/include/linux/min_heap.h
+++ b/include/linux/min_heap.h
@@ -6,6 +6,17 @@
#include <linux/string.h>
#include <linux/types.h>
+/*
+ * The Min Heap API provides utilities for managing min-heaps, a binary tree
+ * structure where each node's value is less than or equal to its children's
+ * values, ensuring the smallest element is at the root.
+ *
+ * Users should avoid directly calling functions prefixed with __min_heap_*().
+ * Instead, use the provided macro wrappers.
+ *
+ * For further details and examples, refer to Documentation/core-api/min_heap.rst.
+ */
+
/**
* Data structure to hold a min-heap.
* @nr: Number of elements currently in the heap.
--
2.34.1
Powered by blists - more mailing lists