Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:test_func

Proto:static int test_func(void *private)

Type:int

Parameter:

TypeParameterName
void *private
385  t = private
391  If set_cpus_allowed_ptr(current process, cpumask_of - the cpumask containing just a given cpu*@cpu: the cpu (<= nr_cpu_ids)(cpu)) < 0 Then pr_err("Failed to set affinity to %d CPU\n", cpu)
394  When i < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(test_case_array) cycle random_array[i] = i
397  If Not sequential_test_order Then shuffle_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  When i < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(test_case_array) cycle
407  index = random_array[i]
412  If Not ((run_test_mask & 1 << index ) >> index) Then Continue
415  kt = ktime_get()
416  When j < test_repeat_count cycle
417  If Not test_func() Then test_passed++
419  Else 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  When Not 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(). cycle
440  msleep - sleep safely even with waitqueue interruptions*@msecs: Time in milliseconds to sleep for
442  Return 0