Skip to content

Commit f508fe9

Browse files
committed
补充了components\utilities\libadt中Kconfig的help内容(修正:移除不必要的.config和rtconfig.h)
1 parent fdb16a4 commit f508fe9

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

components/utilities/libadt/Kconfig

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,88 @@ menuconfig RT_USING_ADT
22
bool "Enable ADT(abstract data type)"
33
default y if ARCH_MM_MMU
44
default n
5+
help
6+
ADT(abstract data type) are a set of general interfaces that encapsulate commonly used data structures.
7+
8+
ADT's Core Functions and Components:
9+
AVL Tree (RT_USING_ADT_AVL)
10+
Bitmap (RT_USING_ADT_BITMAP)
11+
Hash Table (RT_USING_ADT_HASHMAP)
12+
Reference Counting API (RT_USING_ADT_REF)
13+
14+
Features and Advantages of ADT:
15+
Abstract Interface: Hides the implementation details of data structures; only a unified interface needs to be called.
16+
Customizability: Reduces system resource consumption through Kconfig configuration.
17+
Generality: Applicable to various scenarios.
18+
19+
Once enabled, you can use the AVL tree, bitmap, hash table, and reference counting APIs.
520

621
config RT_USING_ADT_AVL
722
bool "AVL tree"
823
depends on RT_USING_ADT
924
default y
25+
help
26+
An AVL tree (RT_USING_ADT_AVL) is a self-balancing binary search tree.
27+
28+
Core capabilities:
29+
Supports efficient insertion, deletion, and search operations;
30+
Data is naturally ordered, facilitating range queries.
31+
32+
Typical scenarios:
33+
Task priority sorting;
34+
Log timestamp indexing;
35+
Ordered management of dynamic configuration items.
36+
37+
Once enabled, AVL trees can be used (ADT must be enabled).
1038

1139
config RT_USING_ADT_BITMAP
1240
bool "Bitmap"
1341
depends on RT_USING_ADT
1442
default y
43+
help
44+
A bitmap (RT_USING_ADT_BITMAP) represents a set of states using consecutive binary bits.
45+
46+
Core capabilities:
47+
Extreme memory efficiency;
48+
Fast set, clear, and query operations based on bitwise operations.
49+
50+
Typical scenarios:
51+
Resource allocation flags;
52+
Permission switches;
53+
State set management.
54+
55+
Once enabled, bitmaps can be used (ADT must be enabled).
1556

1657
config RT_USING_ADT_HASHMAP
1758
bool "HashMap"
1859
depends on RT_USING_ADT
1960
default y
61+
help
62+
Hash Table (RT_USING_ADT_HASHMAP) is a storage structure based on key-value mapping.
63+
64+
Core capabilities:
65+
Average lookup, insertion, and deletion times are close to O(1);
66+
Supports custom hash functions and key comparison rules, adapting to different key types.
67+
68+
Typical scenarios:
69+
Scenarios requiring fast object lookup using unique identifiers;
70+
String key-value pair configuration;
71+
High-frequency query scenarios.
72+
73+
Once enabled, HashMap can be used (ADT must be enabled).
2074

2175
config RT_USING_ADT_REF
2276
bool "Reference API"
2377
depends on RT_USING_ADT
2478
default y
79+
help
80+
The Reference Counting API (RT_USING_ADT_REF) is a mechanism for managing object lifecycles through a counter.
81+
82+
Core capabilities:
83+
Simplifies the release logic of shared resources across multiple modules;
84+
automatically maintains the lifecycle without requiring manual tracking of object users.
85+
86+
Typical scenarios:
87+
Multi-threaded/multi-module shared resources.
88+
89+
Once enabled, Reference API can be used (ADT must be enabled).

0 commit comments

Comments
 (0)