Function report |
Source Code:lib\assoc_array.c |
Create Date:2022-07-28 06:54:10 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Iterate over an associative array. The caller must hold the RCU read lock* or better.
Proto:static int assoc_array_subtree_iterate(const struct assoc_array_ptr *root, const struct assoc_array_ptr *stop, int (*iterator)(const void *leaf, void *iterator_data), void *iterator_data)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const struct assoc_array_ptr * | root | |
const struct assoc_array_ptr * | stop | |
int (* | iterator | |
void * | iterator_data |
33 | begin_node : |
34 | If assoc_array_ptr_is_shortcut(cursor) Then |
41 | slot = 0 |
50 | has_meta = 0 |
51 | When slot < Number of slots per node cycle |
54 | If ptr && assoc_array_ptr_is_leaf(ptr) Then |
74 | If Not (has_meta & Points to node or shortcut ) Then Go to finished_node |
76 | slot = 0 |
78 | continue_node : |
80 | When slot < Number of slots per node cycle |
82 | If assoc_array_ptr_is_meta(ptr) Then |
84 | Go to begin_node |
88 | finished_node : |
90 | parent = READ_ONCE(back_pointer) |
91 | slot = parent_slot |
95 | If assoc_array_ptr_is_shortcut(parent) Then |
98 | parent = READ_ONCE(back_pointer) |
99 | slot = parent_slot |
106 | slot++ |
107 | Go to continue_node |
Name | Describe |
---|---|
assoc_array_iterate | assoc_array_iterate - Pass all objects in the array to a callback*@array: The array to iterate over.*@iterator: The callback function.*@iterator_data: Private data for the callback function.* Iterate over all the objects in an associative array |
assoc_array_delete | assoc_array_delete - Script deletion of an object from an associative array*@array: The array to search.*@ops: The operations to use.*@index_key: The key to the object.* Precalculate and preallocate a script for the deletion of an object from an |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |