Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__xa_cmpxchg() - Store this entry in the XArray

Proto:void *__xa_cmpxchg(struct xarray *xa, unsigned long index, void *old, void *entry, gfp_t gfp)

Type:void

Parameter:

TypeParameterName
struct xarray *xa
unsigned longindex
void *old
void *entry
gfp_tgfp
1448  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, index)
1451  If 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.) Then Return We encode errnos in the xas->xa_node. If an error has happened, we need to* drop the lock to fix it, and once we've done so the xa_state is invalid.( - EINVAL)
1454  Do
1455  curr = xas_load() - Load an entry from the XArray (advanced).*@xas: XArray operation state.* Usually walks the @xas to the appropriate state to load the entry* stored at xa_index. However, it will do nothing and return %NULL if*@xas is in an error state
1456  If curr == old Then
1461  When __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. cycle
1463  Return xas_result( & xas, curr)