函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:check_xa_alloc_1

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

返回类型:void

参数:

类型参数名称
struct xarray *xa
unsigned intbase
654  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.)
656  xa_alloc_index(xa, base, GFP_KERNEL)
659  xa_erase_index(xa, base)
660  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.)
663  xa_alloc_index(xa, base, GFP_KERNEL)
666 i小于2乘XA_CHUNK_SIZE循环xa_alloc_index(xa, i, GFP_KERNEL)
668 i小于2乘XA_CHUNK_SIZE循环xa_erase_index(xa, i)
670  xa_alloc_index(xa, base, GFP_KERNEL)
673  xa_destroy() - Free all internal data structures.*@xa: XArray.* After calling this function, the XArray is empty and has freed all memory* allocated for its internal data structures. You are responsible for* freeing the objects referenced by the XArray.
676  xa_alloc_index(xa, base, GFP_KERNEL)
679  xa_alloc_index(xa, base + 1, GFP_KERNEL)
680  xa_erase_index(xa, base + 1)
683  xa_store_index(xa, base + 1, GFP_KERNEL)
684  xa_alloc_index(xa, base + 2, GFP_KERNEL)
687  xa_erase_index(xa, base)
688  xa_alloc_index(xa, base, GFP_KERNEL)
690  xa_erase_index(xa, base + 1)
691  xa_erase_index(xa, base + 2)
693 i小于5000循环
694  xa_alloc_index(xa, base + i, GFP_KERNEL)
697  xa_destroy() - Free all internal data structures.*@xa: XArray.* After calling this function, the XArray is empty and has freed all memory* allocated for its internal data structures. You are responsible for* freeing the objects referenced by the XArray.
700  XA_BUG_ON(xa, xa_alloc(xa, & id, xa_mk_index(UINT_MAX - 1), XA_LIMIT(UINT_MAX - 1, UINT_MAX), GFP_KERNEL) != 0)
703  XA_BUG_ON(xa, id != 0xfffffffeU)
704  XA_BUG_ON(xa, xa_alloc(xa, & id, xa_mk_index(UINT_MAX), XA_LIMIT(UINT_MAX - 1, UINT_MAX), GFP_KERNEL) != 0)
707  XA_BUG_ON(xa, id != 0xffffffffU)
708  id等于3
709  XA_BUG_ON(xa, xa_alloc(xa, & id, xa_mk_index(0), XA_LIMIT(UINT_MAX - 1, UINT_MAX), GFP_KERNEL) != - EBUSY)
712  XA_BUG_ON(xa, id != 3)
713  xa_destroy() - Free all internal data structures.*@xa: XArray.* After calling this function, the XArray is empty and has freed all memory* allocated for its internal data structures. You are responsible for* freeing the objects referenced by the XArray.
715  XA_BUG_ON(xa, xa_alloc(xa, & id, xa_mk_index(10), XA_LIMIT(10, 5), GFP_KERNEL) != - EBUSY)
717  XA_BUG_ON(xa, xa_store_index(xa, 3, GFP_KERNEL) != 0)
718  XA_BUG_ON(xa, xa_alloc(xa, & id, xa_mk_index(10), XA_LIMIT(10, 5), GFP_KERNEL) != - EBUSY)
720  xa_erase_index(xa, 3)
721  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