函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:void *xas_find_marked(struct xa_state *xas, unsigned long max, xa_mark_t mark)

返回类型:void

参数:

类型参数名称
struct xa_state *xas
unsigned longmax
xa_mark_tmark
1152  bool advance = true
1156  如果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.则返回:NULL
1158  如果xa_index大于max则转到:max
1161  如果非xa_node
1162  xa_index等于1
1163  转到:out
1164  否则如果True if the node represents head-of-tree, RESTART or BOUNDS
1165  advance = false
1166  entry等于Private
1167  xa_node = NULL
1168  如果xa_index大于The maximum index that can be contained in the array without expanding it 则转到:out
1170  如果非Private
1173  xa_index等于1
1174  转到:out
1176  xa_node等于Private
1177  xa_offset等于xa_index右移Bits remaining in each slot
1180 xa_index小于等于max循环
1183  xa_node等于Private
1184  如果非xa_node退出
1186  advance = false
1187  继续下一循环
1190  如果非advance
1191  entry等于Private
1198  offset等于Private
1199  如果offset大于xa_offset
1200  advance = false
1203  如果xa_index减1大于等于max则转到:max
1205  xa_offset等于offset
1206  如果offset恒等于XA_CHUNK_SIZE则继续下一循环
1210  entry等于Private
1211  如果非Private 则返回:entry
1213  xa_node等于Private
1214  xas_set_offset(xas)
1217  out :
1218  如果xa_index大于max则转到:max
1220  返回:set_bounds(xas)
1221  max :
1222  xa_node等于XAS_RESTART
1223  返回:NULL
调用者
名称描述
__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
__xa_alloc__xa_alloc() - Find somewhere to store this entry in the XArray