Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:check

Proto:static void check(int nr_nodes)

Type:void

Parameter:

TypeParameterName
intnr_nodes
194  count = 0 , blacks = 0
195  prev_key = 0
197  When rb cycle
198  node = rb_entry(rb, structtest_node, rb)
199  WARN_ON_ONCE(key < prev_key)
200  WARN_ON_ONCE(is_red(rb) && (!rb_parent(rb) || is_red(rb_parent(rb))))
202  If Not count Then blacks = black_path_count(rb)
204  Else WARN_ON_ONCE((!rb_left || !rb_right) && blacks != black_path_count(rb))
207  prev_key = key
208  count++
211  WARN_ON_ONCE(count != nr_nodes)
212  WARN_ON_ONCE(count < (1 << black_path_count(rb_last( & rb_root))) - 1)
214  check_postorder(nr_nodes)
215  check_postorder_foreach(nr_nodes)
Caller
NameDescribe
check_augmented
rbtree_test_init