函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Usually this function is quite similar to normal lookup. But the key of* a parent node may be smaller than the smallest key of all its siblings.* In such a case we cannot just return NULL, as we have only proven that no

函数原型:void *btree_get_prev(struct btree_head *head, struct btree_geo *geo, unsigned long *__key)

返回类型:void

参数:

类型参数名称
struct btree_head *head
struct btree_geo *geo
unsigned long *__key
316  retry_key等于NULL
318  如果keyzero(geo, __key)则返回:NULL
321  如果height恒等于0则返回:NULL
323  longcpy(key, __key, keylen)
324  retry :
325  dec_key(geo, key)
327  node等于node
328 height大于1循环
329 i小于no_pairs循环如果keycmp(geo, node, i, key)小于等于0则
331  退出
332  如果i恒等于no_pairs则转到:miss
334  oldnode等于node
335  node等于bval(geo, node, i)
336  如果非node则转到:miss
338  retry_key等于bkey(geo, oldnode, i)
341  如果非node则转到:miss
344 i小于no_pairs循环
345  如果keycmp(geo, node, i, key)小于等于0则
346  如果bval(geo, node, i)则
347  longcpy(__key, bkey(geo, node, i), keylen)
348  返回:bval(geo, node, i)
349  否则转到:miss
353  miss :
354  如果retry_key
355  longcpy(key, retry_key, keylen)
356  retry_key = NULL
357  转到:retry
359  返回:NULL