Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:xas_find() - Find the next present entry in the XArray

Proto:void *xas_find(struct xa_state *xas, unsigned long max)

Type:void

Parameter:

TypeParameterName
struct xa_state *xas
unsigned longmax
1085  If 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_node == XAS_BOUNDS Then Return NULL
1087  If xa_index > max Then Return set_bounds(xas)
1090  If Not xa_node Then
1091  xa_index = 1
1092  Return set_bounds(xas)
1093  Else if xa_node == XAS_RESTART Then
1094  entry = 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
1095  If entry || True if the pointer is something other than a node Then Return entry
1097  Else if Not Bits remaining in each slot && xa_offset != (xa_index & XA_CHUNK_MASK) Then
1099  xa_offset = ( xa_index - 1 & XA_CHUNK_MASK) + 1
1102  xas_advance(xas)
1104  When xa_node && xa_index <= max cycle
1107  xa_node = Private
1108  Continue
1111  entry = Private
1112  If Private Then
1113  xa_node = Private
1114  xa_offset = 0
1115  Continue
1117  If entry && Not xa_is_sibling() - Is the entry a sibling entry?*@entry: Entry retrieved from the XArray* Return: %true if the entry is a sibling entry. Then Return entry
1120  xas_advance(xas)
1123  If Not xa_node Then xa_node = XAS_BOUNDS
1125  Return NULL
Caller
NameDescribe
xa_findxa_find() - Search the XArray for an entry.*@xa: XArray.*@indexp: Pointer to an index.*@max: Maximum index to search to.*@filter: Selection criterion.* Finds the entry in @xa which matches the @filter, and has the lowest
xa_find_afterxa_find_after() - Search the XArray for a present entry.*@xa: XArray.*@indexp: Pointer to an index.*@max: Maximum index to search to.*@filter: Selection criterion.* Finds the entry in @xa which matches the @filter and has the lowest
check_xas_retry
check_move_max
xas_next_entryxas_next_entry() - Advance iterator to next present entry.*@xas: XArray operation state.*@max: Highest index to return.* xas_next_entry() is an inline function to optimise xarray traversal for* speed