Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:xas_shrink

Proto:static void xas_shrink(struct xa_state *xas)

Type:void

Parameter:

TypeParameterName
struct xa_state *xas
435  xa = xa
436  node = xa_node
438  cycle
441  XA_NODE_BUG_ON(node, Total entry count > XA_CHUNK_SIZE)
442  If Total entry count != 1 Then Break
444  entry = Private
445  If Not entry Then Break
447  If Not Private && Bits remaining in each slot Then Break
449  If xa_is_zero() - Is the entry a zero entry?*@entry: Entry retrieved from the XArray* The normal API will return NULL as the contents of a slot containing* a zero entry. You can only see zero entries by using the advanced API. && xa_zero_busy(xa) Then entry = NULL
451  xa_node = XAS_BOUNDS
453  RCU_INIT_POINTER() - initialize an RCU protected pointer*@p: The pointer to be initialized.*@v: The value to initialized the pointer to.* Initialize an RCU-protected pointer in special cases where readers(xa_head, entry)
454  If xa_track_free(xa) && Not node_get_mark(node, 0, XA_FREE_MARK) Then xa_mark_clear(xa, XA_FREE_MARK)
457  Total entry count = 0
458  Value entry count = 0
459  If Not Private Then RCU_INIT_POINTER() - initialize an RCU protected pointer*@p: The pointer to be initialized.*@v: The value to initialized the pointer to.* Initialize an RCU-protected pointer in special cases where readers(slots[0], XA_RETRY_ENTRY)
461  xas_update(xas, node)
462  xa_node_free(node)
463  If Not Private Then Break
465  node = Private
466  NULL at top of tree = NULL
Caller
NameDescribe
xas_delete_nodexas_delete_node() - Attempt to delete an xa_node*@xas: Array operation state.* Attempts to delete the @xas->xa_node. This will fail if xa->node has* a non-zero reference count.