函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_func

函数原型:static int test_func(void *private)

返回类型:int

参数:

类型参数名称
void *private
385  t等于private
391  如果set_cpus_allowed_ptr(当前进程, cpumask_of - the cpumask containing just a given cpu*@cpu: the cpu (<= nr_cpu_ids)(cpu))小于0则打印错误信息("Failed to set affinity to %d CPU\n", cpu)
394 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(test_case_array)循环random_array[i]等于i
397  如果非sequential_test_ordershuffle_array(random_array, ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(test_case_array))
403  lock for reading
405  start等于get_cycles()
406 i小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(test_case_array)循环
407  index等于random_array[i]
412  如果非run_test_mask按位与1左移index位的值右移index位的值则继续下一循环
415  kt等于ktime_get()
416 j小于test_repeat_count循环
417  如果非test_func()则test_passed自加
419  否则test_failed自加
426  delta等于ktime_us_delta(ktime_get(), kt)
427  do_div() is NOT a C function(delta, (u32)test_repeat_count)
429  time等于delta
431  stop等于get_cycles()
433  lease a read lock
434  test_report_one_done()
439  当非kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().循环
440  msleep - sleep safely even with waitqueue interruptions*@msecs: Time in milliseconds to sleep for
442  返回:0