函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\assoc_array.c Create Date:2022-07-27 07:51:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:struct assoc_array_edit *assoc_array_delete(struct assoc_array *array, const struct assoc_array_ops *ops, const void *index_key)

返回类型:struct assoc_array_edit

参数:

类型参数名称
struct assoc_array *array
const struct assoc_array_ops *ops
const void *index_key
1091  打印调试信息("-->%s()\n", __func__)
1093  edit等于分配内存并置零
1094  如果非edit则返回:错误号
1096  array等于array
1097  ops等于ops
1098  adjust_count_by等于负1
1101  :Navigate through the internal tree looking for the closest node to the key.恒等于assoc_array_walk_found_terminal_node
1105  打印调试信息("terminal_node\n")
1106  node等于 Node in which leaf might be found
1109  ptr等于slots[slot]
1117  :Navigate through the internal tree looking for the closest node to the key.恒等于assoc_array_walk_tree_empty
1118  :Navigate through the internal tree looking for the closest node to the key.恒等于assoc_array_walk_found_wrong_shortcut
1119  默认
1120  assoc_array_cancel_edit - Discard an edit script
1121  打印调试信息("not found\n")
1122  返回:NULL
1125  found_leaf :
1126  BUG_ON(nr_leaves_on_tree <= 0)
1131  dead_leaf等于slots[slot]
1132  ptr等于slots[slot]
1133  to = NULL
1134  adjust_count_on等于node
1139  如果nr_leaves_on_tree恒等于1则
1140  ptr等于The node at the root of the tree
1141  to = NULL
1142  adjust_count_on = NULL
1143  excised_subtree等于The node at the root of the tree
1144  打印调试信息("all gone\n")
1145  返回:edit
1158  如果nr_leaves_on_branch小于等于Number of slots per node 加1则
1166  has_meta = false
1168  ptr等于slots[i]
1169  如果assoc_array_ptr_is_meta(ptr)则
1170  has_meta = true
1171  退出
1175  打印调试信息("leaves: %ld [m=%d]\n", nr_leaves_on_branch - 1, has_meta)
1181  parent等于node
1182  collapse_up :
1183  打印调试信息("collapse subtree: %ld\n", nr_leaves_on_branch)
1185  ptr等于back_pointer
1186  如果非ptr则转到:do_collapse
1188  如果assoc_array_ptr_is_shortcut(ptr)则
1190  ptr等于back_pointer
1191  如果非ptr则转到:do_collapse
1195  grandparent等于assoc_array_ptr_to_node(ptr)
1196  如果nr_leaves_on_branch小于等于Number of slots per node 加1则
1197  parent等于grandparent
1198  转到:collapse_up
1201  do_collapse :
1206  如果has_metaparent不等于node
1207  node等于parent
1211  如果非new_n0则转到:enomem
1216  parent_slot等于parent_slot
1218  adjust_count_on等于new_n0
1220  node等于new_n0
1222  slot等于0
1227  打印调试信息("collapsed %d,%lu\n", slot, nr_leaves_on_branch)
1230  如果非back_pointer
1232  否则如果assoc_array_ptr_is_leaf(back_pointer)则
1233  BUG()
1234  否则如果assoc_array_ptr_is_node(back_pointer)则
1238  否则如果assoc_array_ptr_is_shortcut(back_pointer)则
1248  返回:edit
1250  enomem :
1252  打印调试信息("enomem\n")
1253  assoc_array_cancel_edit - Discard an edit script
1254  返回:错误号
调用者
名称描述
__key_unlink_beginBegin the process of unlinking a key from a keyring.