函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:xas_create() - Create a slot to store an entry in.*@xas: XArray operation state.*@allow_root: %true if we can store the entry in the root directly* Most users will not need to call this function directly, as it is called* by xas_store()

函数原型:static void *xas_create(struct xa_state *xas, bool allow_root)

返回类型:void

参数:

类型参数名称
struct xa_state *xas
boolallow_root
637  xa等于xa
639  __rcuslot
640  node等于xa_node
642  order等于xa_shift
644  如果True if the node represents head-of-tree, RESTART or BOUNDS
645  entry等于Private
646  xa_node = NULL
647  如果非entryxa_zero_busy(xa)则entry等于XA_ZERO_ENTRY
649  shift等于xas_expand adds nodes to the head of the tree until it has reached* sufficient height to be able to contain @xas->xa_index
650  如果shift小于0则返回:NULL
652  如果非shift且非allow_rootshift等于The xarray is constructed out of a set of 'chunks' of pointers
654  entry等于Private
655  slot等于xa_head
656  否则如果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.
657  返回:NULL
658  否则如果node
659  offset等于xa_offset
661  shift等于Bits remaining in each slot
662  entry等于Private
663  slot等于slots[offset]
664  否则
665  shift等于0
666  entry等于Private
667  slot等于xa_head
670 shift大于order循环
671  shift减等于The xarray is constructed out of a set of 'chunks' of pointers
672  如果非entry
673  node等于xas_alloc(xas, shift)
674  如果非node退出
679  否则如果Private
680  node等于Private
681  否则
682  退出
684  entry等于xas_descend(xas, node)
685  slot等于slots[xa_offset]
688  返回:entry
调用者
名称描述
xas_create_rangexas_create_range() - Ensure that stores to this range will succeed*@xas: XArray operation state.* Creates all of the slots in the range covered by @xas. Sets @xas to* create single-index entries and positions it at the beginning of the* range
xas_storexas_store() - Store this entry in the XArray
xa_store_rangexa_store_range() - Store this entry at a range of indices in the XArray