Function report | 
Source Code:lib\assoc_array.c | 
Create Date:2022-07-28 06:54:16 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Destructively iterate over an associative array. The caller must prevent* other simultaneous accesses.
Proto:static void assoc_array_destroy_subtree(struct assoc_array_ptr *root, const struct assoc_array_ops *ops)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct assoc_array_ptr * | root | |
| const struct assoc_array_ops * | ops | 
| 348 | struct assoc_array_ptr * cursor, * parent = NULL | 
| 349 | slot = -1 | 
| 354 | If Not cursor Then | 
| 355 | pr_devel("empty\n") | 
| 356 | Return | 
| 359 | move_to_meta : | 
| 360 | If assoc_array_ptr_is_shortcut(cursor) Then | 
| 365 | BUG_ON(back_pointer != parent) | 
| 366 | BUG_ON(slot != - 1 && parent_slot != slot) | 
| 369 | slot = -1 | 
| 370 | BUG_ON(!assoc_array_ptr_is_node(cursor)) | 
| 374 | node = assoc_array_ptr_to_node(cursor) | 
| 375 | BUG_ON(back_pointer != parent) | 
| 376 | BUG_ON(slot != - 1 && parent_slot != slot) | 
| 377 | slot = 0 | 
| 379 | continue_node : | 
| 380 | pr_devel("Node %p [back=%p]\n", node, back_pointer) | 
| 381 | When slot < Number of slots per node cycle | 
| 397 | parent = back_pointer | 
| 398 | slot = parent_slot | 
| 399 | pr_devel("free node\n") | 
| 401 | If Not parent Then Return | 
| 406 | If assoc_array_ptr_is_shortcut(parent) Then | 
| 410 | parent = back_pointer | 
| 411 | slot = parent_slot | 
| 412 | pr_devel("free shortcut\n") | 
| 414 | If Not parent Then Return | 
| 417 | BUG_ON(!assoc_array_ptr_is_node(parent)) | 
| 423 | node = assoc_array_ptr_to_node(cursor) | 
| 424 | slot++ | 
| 425 | Go to continue_node | 
| Name | Describe | 
|---|---|
| assoc_array_destroy | assoc_array_destroy - Destroy an associative array*@array: The array to destroy.*@ops: The operations to use.* Discard all metadata and free all objects in an associative array. The* array will be empty and ready to use again upon completion. This function | 
| assoc_array_rcu_cleanup | |
| assoc_array_gc | assoc_array_gc - Garbage collect an associative array | 
| 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  |