函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__xa_alloc() - Find somewhere to store this entry in the XArray

函数原型:int __xa_alloc(struct xarray *xa, u32 *id, void *entry, struct xa_limit limit, gfp_t gfp)

返回类型:int

参数:

类型参数名称
struct xarray *xa
u32 *id
void *entry
struct xa_limitlimit
gfp_tgfp
1615  XA_STATE() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.* Declare and initialise an xa_state on the stack.(xas, xa, 0)
1617  如果WARN_ON_ONCE(xa_is_advanced() - Is the entry only permitted for the advanced API?*@entry: Entry to be stored in the XArray.* Return: %true if the entry cannot be stored by the normal API.)则返回:负EINVAL
1619  如果WARN_ON_ONCE(!xa_track_free(xa))则返回:负EINVAL
1622  如果非entryentry等于XA_ZERO_ENTRY
1625  循环
1626  xa_index等于min
1627  xas_find_marked() - Find the next marked entry in the XArray.*@xas: XArray operation state.*@max: Highest index to return.*@mark: Mark number to search for.* If the @xas has not yet been walked to an entry, return the marked entry
1628  如果xa_node恒等于XAS_RESTARTxas_set_err() - Note an error in the xa_state.*@xas: XArray operation state.*@err: Negative error number.* Only call this function with a negative @err; zero or positive errors* will probably not behave the way you think they should. If you want
1630  否则id等于xa_index
1632  xas_store() - Store this entry in the XArray
1633  xas_clear_mark() - Clears the mark on this entry and its parents.*@xas: XArray operation state.*@mark: Mark number.* Clears the specified mark on this entry, and walks back to the head* attempting to clear it on all the ancestor entries. Does nothing if
1634 __xas_nomem() - Drop locks and allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* Internal variant of xas_nomem().* Return: true if memory was needed, and was successfully allocated.循环
1636  返回: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.
调用者
名称描述
__xa_alloc_cyclic__xa_alloc_cyclic() - Find somewhere to store this entry in the XArray.*@xa: XArray.*@id: Pointer to ID.*@entry: New entry.*@limit: Range of allocated ID.*@next: Pointer to next ID to allocate.*@gfp: Memory allocation flags.