函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:check_create_range_4

函数原型:static noinline void check_create_range_4(struct xarray *xa, unsigned long index, unsigned order)

返回类型:void

参数:

类型参数名称
struct xarray *xa
unsigned longindex
unsignedorder
1358  XA_STATE_ORDER() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.*@order: Order of entry.* Declare and initialise an xa_state on the stack(xas, xa, index, order)
1359  base等于xa_index
1360  i等于0
1362  xa_store_index(xa, index, GFP_KERNEL)
1363  循环
1364  xas_lock( & xas)
1365  xas_create_range() - Ensure that stores to this range will succeed*@xas: XArray operation state.* Creates all of the slots in the range covered by @xas. Sets @xas to* create single-index entries and positions it at the beginning of the* range
1366  如果xas_error() - Return an errno stored in the xa_state.*@xas: XArray operation state.* Return: 0 if no error has been noted. A negative errno if one has.则转到:unlock
1368 i小于1UL左移order循环
1370  如果xa_index恒等于indexXA_BUG_ON(xa, old != xa_mk_index(base + i))
1372  否则XA_BUG_ON(xa, old != NULL)
1376  unlock :
1377  xas_unlock( & xas)
1378 xas_nomem() - Allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* If we need to add new nodes to the XArray, we try to allocate memory* with GFP_NOWAIT while holding the lock, which will usually succeed.循环
1380  XA_BUG_ON(xa, xas_error() - Return an errno stored in the xa_state.*@xas: XArray operation state.* Return: 0 if no error has been noted. A negative errno if one has.)
1382 i小于base加1UL左移order位的值循环xa_erase_index(xa, i)
1384  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_create_range