函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_rht_lookup

函数原型:static int __init test_rht_lookup(struct rhashtable *ht, struct test_obj *array, unsigned int entries)

返回类型:int

参数:

类型参数名称
struct rhashtable *ht
struct test_obj *array
unsigned intentries
142 i小于entries循环
144  expected等于非i与2的模
145  struct test_obj_val key = {id = i, }
149  如果id恒等于TEST_INSERT_FAILexpected = false
152  obj等于hashtable_lookup_fast - search hash table, without RCU read lock*@ht: hash table*@key: the pointer to the key*@params: hash table parameters* Computes the hash value for the key and traverses the bucket chain looking* for a entry with an identical key
154  如果expected且非obj
155  打印警告信息("Test failed: Could not find key %u\n", id)
156  返回:负ENOENT
157  否则如果非expectedobj
158  打印警告信息("Test failed: Unexpected entry found for key %u\n", id)
160  返回:负EEXIST
161  否则如果expectedobj
162  如果id不等于i
163  打印警告信息("Test failed: Lookup value mismatch %u!=%u\n", id, i)
165  返回:负EINVAL
169  cond_resched_rcu()
172  返回:0
调用者
名称描述
test_rhashtable