Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\btree.c Create Date:2022-07-28 06:53:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__btree_for_each

Proto: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)

Type:size_t

Parameter:

TypeParameterName
struct btree_head *head
struct btree_geo *geo
unsigned long *node
unsigned longopaque
void (*func
void *func2
intreap
intheight
size_tcount
686  When i < no_pairs cycle
687  child = bval(geo, node, i)
688  If Not child Then Break
690  If height > 1 Then count = __btree_for_each(head, geo, child, opaque, func, func2, reap, height - 1, count)
693  Else func(child, opaque, bkey(geo, node, i), count++, func2)
697  If reap Then mempool_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  Return count
Caller
NameDescribe
__btree_for_each
btree_visitor
btree_grim_visitor