函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__btree_for_each

函数原型:static size_t __btree_for_each(struct btree_head *head, struct btree_geo *geo, unsigned long *node, unsigned long opaque, void (*func)(void *elem, unsigned long opaque, unsigned long *key, size_t index, void *func2), void *func2, int reap, int height, size_t count)

返回类型:size_t

参数:

类型参数名称
struct btree_head *head
struct btree_geo *geo
unsigned long *node
unsigned longopaque
void (*func
void *func2
intreap
intheight
size_tcount
686 i小于no_pairs循环
687  child等于bval(geo, node, i)
688  如果非child退出
690  如果height大于1则count等于__btree_for_each(head, geo, child, opaque, func, func2, reap, height - 1, count)
693  否则func(child, opaque, bkey(geo, node, i), count++, func2)
697  如果reapmempool_free - return an element to the pool.*@element: pool element pointer.*@pool: pointer to the memory pool which was allocated via* mempool_create().* this function only sleeps if the free_fn() function sleeps.
699  返回:count
调用者
名称描述
__btree_for_each
btree_visitor
btree_grim_visitor