函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_rhashtable_max

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

返回类型:int

参数:

类型参数名称
struct test_obj *array
unsigned intentries
451  insert_retries等于0
454  max_size等于undup_pow_of_two - round the given value up to nearest power of two*@n: parameter* round the given value up to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(entries / 8)
455  err等于hashtable_init - initialize a new hash table*@ht: hash table to be initialized*@params: configuration parameters* Initializes a new hash table based on the provided configuration* parameters
456  如果err则返回:err
459 i小于max_elems循环
460  obj等于array[i]
462  id等于i乘2
463  err等于insert_retry( & ht, obj, test_rht_params)
464  如果err大于0则insert_retries加等于err
466  否则如果err则返回:err
470  err等于insert_retry( & ht, & array[max_elems], test_rht_params)
471  如果err恒等于负E2BIG
472  err等于0
473  否则
474  打印信息("insert element %u should have failed with %d, got %d\n", max_elems, - E2BIG, err)
476  如果err恒等于0则err等于负1
480  rhashtable_destroy( & ht)
482  返回:err
调用者
名称描述
test_rht_init