函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_insert_dup

函数原型:static int __init test_insert_dup(struct test_obj_rhl *rhl_test_objects, int cnt, bool slow)

返回类型:int

参数:

类型参数名称
struct test_obj_rhl *rhl_test_objects
intcnt
boolslow
539  err等于0
541  rhlt等于kmalloc(rhlt的长度, GFP_KERNEL)
542  如果WARN_ON(!rhlt)则返回:负EINVAL
545  err等于hltable_init - initialize a new hash list table*@hlt: hash list table to be initialized*@params: configuration parameters* Initializes a new hash list table.* See documentation for rhashtable_init.
546  如果WARN_ON(err)则
547  kfree(rhlt)
548  返回:err
551 i小于cnt循环
552  tid等于i
553  key等于rht_obj( & ht, & rhead)
554  key加等于key_offset
556  如果slow
557  err等于错误
559  如果err恒等于负EAGAINerr等于0
561  否则err等于hltable_insert - insert object into hash list table*@hlt: hash list table*@list: pointer to hash list head inside object*@params: hash table parameters* Will take the per bucket bitlock to protect against mutual mutations* on the same bucket
565  如果WARN(err, "error %d on element %d/%d (%s)\n", err, i, cnt, slow ? "slow" : "fast")则转到:skip_print
569  ret等于print_ht(rhlt)
570  WARN(ret != cnt, "missing rhltable elements (%d != %d, %s)\n", ret, cnt, slow ? "slow" : "fast")
572  skip_print :
573  rhltable_destroy(rhlt)
574  kfree(rhlt)
576  返回:0
调用者
名称描述
test_insert_duplicates_run