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_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

Proto:void *xas_find_marked(struct xa_state *xas, unsigned long max, xa_mark_t mark)

Type:void

Parameter:

TypeParameterName
struct xa_state *xas
unsigned longmax
xa_mark_tmark
1152  bool advance = true
1156  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. Then Return NULL
1158  If xa_index > max Then Go to max
1161  If Not xa_node Then
1162  xa_index = 1
1163  Go to out
1164  Else if True if the node represents head-of-tree, RESTART or BOUNDS Then
1165  advance = false
1166  entry = Private
1167  xa_node = NULL
1168  If xa_index > The maximum index that can be contained in the array without expanding it Then Go to out
1170  If Not Private Then
1173  xa_index = 1
1174  Go to out
1176  xa_node = Private
1177  xa_offset = xa_index >> Bits remaining in each slot
1180  When xa_index <= max cycle
1183  xa_node = Private
1184  If Not xa_node Then Break
1186  advance = false
1187  Continue
1190  If Not advance Then
1191  entry = Private
1198  offset = Private
1199  If offset > xa_offset Then
1200  advance = false
1203  If xa_index - 1 >= max Then Go to max
1205  xa_offset = offset
1206  If offset == XA_CHUNK_SIZE Then Continue
1210  entry = Private
1211  If Not Private Then Return entry
1213  xa_node = Private
1214  xas_set_offset(xas)
1217  out :
1218  If xa_index > max Then Go to max
1220  Return set_bounds(xas)
1221  max :
1222  xa_node = XAS_RESTART
1223  Return NULL
Caller
NameDescribe
__xa_alloc
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
ida_alloc_rangeda_alloc_range() - Allocate an unused ID.*@ida: IDA handle.*@min: Lowest ID to allocate.*@max: Highest ID to allocate.*@gfp: Memory allocation flags.* Allocate an ID between @min and @max, inclusive. The allocated ID will
xas_next_markedxas_next_marked() - Advance iterator to next marked entry.*@xas: XArray operation state.*@max: Highest index to return.*@mark: Mark to search for.* xas_next_marked() is an inline function to optimise xarray traversal for* speed