函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:assoc_array_insert - Script insertion of an object into an associative array*@array: The array to insert into

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

返回类型:struct assoc_array_edit

参数:

类型参数名称
struct assoc_array *array
const struct assoc_array_ops *ops
const void *index_key
void *object
972  打印调试信息("-->%s()\n", __func__)
979  BUG_ON(assoc_array_ptr_is_meta(object))
981  edit等于分配内存并置零
982  如果非edit则返回:错误号
984  array等于array
985  ops等于ops
986  leaf等于assoc_array_leaf_to_ptr(object)
987  adjust_count_by等于1
990  :Navigate through the internal tree looking for the closest node to the key.恒等于assoc_array_walk_tree_empty
992  如果非Handle insertion into an empty tree.则转到:enomem
994  返回:edit
996  :Navigate through the internal tree looking for the closest node to the key.恒等于assoc_array_walk_found_terminal_node
1001  如果非Handle insertion into a terminal node.则转到:enomem
1004  返回:edit
1006  :Navigate through the internal tree looking for the closest node to the key.恒等于assoc_array_walk_found_wrong_shortcut
1010  如果非Handle insertion into the middle of a shortcut.则转到:enomem
1012  返回:edit
1015  enomem :
1017  打印调试信息("enomem\n")
1018  assoc_array_cancel_edit - Discard an edit script
1019  返回:错误号
调用者
名称描述
__key_link_beginPreallocate memory so that a key can be linked into to a keyring.