函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:check_xa_alloc_3

函数原型:static noinline void check_xa_alloc_3(struct xarray *xa, unsigned int base)

返回类型:void

参数:

类型参数名称
struct xarray *xa
unsigned intbase
777  limit等于XA_LIMIT(1, 0x3fff)
778  next等于0
783  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(1), limit, & next, GFP_KERNEL) != 0)
785  XA_BUG_ON(xa, id != 1)
787  next等于0x3ffd
788  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(0x3ffd), limit, & next, GFP_KERNEL) != 0)
790  XA_BUG_ON(xa, id != 0x3ffd)
791  xa_erase_index(xa, 0x3ffd)
792  xa_erase_index(xa, 1)
793  XA_BUG_ON(xa, !xa_empty() - Determine if an array has any present entries.*@xa: XArray.* Context: Any context.* Return: %true if the array contains only NULL pointers.)
795 i小于0x4003循环
796  如果i小于0x4000则entry等于xa_mk_index(i)
798  否则entry等于xa_mk_index(i - 0x3fff)
800  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, entry, limit, & next, GFP_KERNEL) != (id == 1))
802  XA_BUG_ON(xa, xa_mk_index(id) != entry)
806  如果base不等于0则xa_erase_index(xa, base)
808  xa_erase_index(xa, base + 1)
809  next等于UINT_MAX
810  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(UINT_MAX), xa_limit_32b, & next, GFP_KERNEL) != 0)
812  XA_BUG_ON(xa, id != UINT_MAX)
813  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(base), xa_limit_32b, & next, GFP_KERNEL) != 1)
815  XA_BUG_ON(xa, id != base)
816  XA_BUG_ON(xa, xa_alloc_cyclic(xa, & id, xa_mk_index(base + 1), xa_limit_32b, & next, GFP_KERNEL) != 0)
818  XA_BUG_ON(xa, id != base + 1)
820  xa_for_each() - Iterate over present entries in an XArray.*@xa: XArray.*@index: Index of @entry.*@entry: Entry retrieved from array.* During the iteration, @entry will have the value of the entry stored* in @xa at @index(xa, index, entry)
821  xa_erase_index(xa, index)
823  XA_BUG_ON(xa, !xa_empty() - Determine if an array has any present entries.*@xa: XArray.* Context: Any context.* Return: %true if the array contains only NULL pointers.)
调用者
名称描述
check_xa_alloc