函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:test_parman_check_array

函数原型:static int test_parman_check_array(struct test_parman *test_parman, bool gaps_allowed)

返回类型:int

参数:

类型参数名称
struct test_parman *test_parman
boolgaps_allowed
303  last_unused_items等于0
304  last_priority等于0
305  used_items等于0
308  如果prio_array_limit小于TEST_PARMAN_BASE_COUNT
309  打印错误信息("Array limit is lower than the base count (%lu < %lu)\n", prio_array_limit, TEST_PARMAN_BASE_COUNT)
311  返回:负EINVAL
314 i小于prio_array_limit循环
315  item等于prio_array[i]
317  如果非item
318  last_unused_items自加
319  继续下一循环
321  如果last_unused_items且非gaps_allowed
322  打印错误信息("Gap found in array even though they are forbidden\n")
323  返回:负EINVAL
326  last_unused_items等于0
327  used_items自加
329  如果priority小于last_priority
330  打印错误信息("Item belongs under higher priority then the last one (current: %lu, previous: %lu)\n", priority, last_priority)
332  返回:负EINVAL
334  last_priority等于priority
336  如果index不等于i
337  打印错误信息("Item has different index in compare to where it actually is (%lu != %d)\n", index, i)
339  返回:负EINVAL
343  如果used_items不等于used_items
344  打印错误信息("Number of used items in array does not match (%u != %u)\n", used_items, used_items)
346  返回:负EINVAL
349  如果last_unused_items大于等于TEST_PARMAN_RESIZE_STEP_COUNT
350  打印错误信息("Number of unused item at the end of array is bigger than resize step (%u >= %lu)\n", last_unused_items, TEST_PARMAN_RESIZE_STEP_COUNT)
352  返回:负EINVAL
355  打印信息("Priority array check successful\n")
357  返回:0
调用者
名称描述
test_parman_lsort