Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:check_xa_alloc_1

Proto:static noinline void check_xa_alloc_1(struct xarray *xa, unsigned int base)

Type:void

Parameter:

TypeParameterName
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  When i < 2 * XA_CHUNK_SIZE cycle xa_alloc_index(xa, i, GFP_KERNEL)
668  When i < 2 * XA_CHUNK_SIZE cycle 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  When i < 5000 cycle
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.)
Caller
NameDescribe
check_xa_alloc