函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:assoc_array_find - Find an object by index key*@array: The associative array to search

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

返回类型:void

参数:

类型参数名称
const struct assoc_array *array
const struct assoc_array_ops *ops
const void *index_key
314  如果Navigate through the internal tree looking for the closest node to the key.不等于assoc_array_walk_found_terminal_node则返回:NULL
318  node等于 Node in which leaf might be found
323 slot小于Number of slots per node 循环
324  ptr等于READ_ONCE(slots[slot])
325  如果ptrassoc_array_ptr_is_leaf(ptr)则
331  如果compare_object(leaf, index_key)则返回:leaf
336  返回:NULL
调用者
名称描述
find_key_to_updateSearch the given keyring for a key that might be updated.* The caller must guarantee that the keyring is a keyring and that the* permission is granted to modify the keyring as no check is made here. The
search_keyringSearch inside a keyring for a key. We can search by walking to it* directly based on its index-key or we can iterate over the entire* tree looking for it, based on the match function.