函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:udelay_test_single

函数原型:static int udelay_test_single(struct seq_file *s, int usecs, uint32_t iters)

返回类型:int

参数:

类型参数名称
struct seq_file *s
intusecs
uint32_titers
30  min等于0, max等于0, fail_count等于0
31  sum等于0
35  allowed_error_ns等于usecs乘5
37 i小于iters循环
41  kt1等于ktime_get_ns()
42  0x10c7 is 2**32 / 1000000 (rounded up) (usecs)
43  kt2等于ktime_get_ns()
44  time_passed等于kt2kt1
46  如果i恒等于0或time_passed小于minmin等于time_passed
48  如果i恒等于0或time_passed大于maxmax等于time_passed
50  如果time_passedallowed_error_ns的和除1000小于usecsfail_count先自加
52  WARN_ON(time_passed < 0)
53  sum加等于time_passed
56  avg等于sum
57  do_div() is NOT a C function(avg, iters)
58  seq_printf(s, "%d usecs x %d: exp=%d allowed=%d min=%d avg=%lld max=%d", usecs, iters, usecs * 1000, (usecs * 1000) - allowed_error_ns, min, avg, max)
61  如果fail_countseq_printf(s, " FAIL=%d", fail_count)
63  seq_puts(s, "\n")
65  返回:0
调用者
名称描述
udelay_test_show