函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selftest

函数原型:static int selftest(unsigned long max)

返回类型:int

参数:

类型参数名称
unsigned longmax
268  如果非max则返回:0
271 x小于max循环
272  slow等于slow_is_prime_number(x)
273  fast等于s_prime_number - test whether the given number is prime*@x: the number to test* A prime number is an integer greater than 1 that is only divisible by* itself and 1
275  如果slow不等于fast
276  打印错误信息("inconsistent result for is-prime(%lu): slow=%s, fast=%s!", x, slow ? "yes" : "no", fast ? "yes" : "no")
278  转到:err
281  如果非slow则继续下一循环
287  转到:err
289  last等于x
292  打印信息("selftest(%lu) passed, last prime was %lu", x, last)
293  返回:0
295  err :
296  dump_primes()
297  返回:负EINVAL
调用者
名称描述
primes_init