Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\resource.c Create Date:2022-07-28 09:05:18
Last Modify:2022-05-22 11:14:39 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Insert a resource into the resource tree. If successful, return NULL,* otherwise return the conflicting resource (compare to __request_resource())

Proto:static struct resource *__insert_resource(struct resource *parent, struct resource *new)

Type:struct resource

Parameter:

TypeParameterName
struct resource *parent
struct resource *new
785  cycle
786  first = Return the conflict entry if you can't request it
787  If Not first Then Return first
790  If first == parent Then Return first
792  If WARN_ON(first == new) Then Return first
795  If start > start || end < end Then Break
797  If start == start && end == end Then Break
801  cycle
803  If start < start || end > end Then Return next
805  If Not sibling Then Break
807  If start > end Then Break
811  parent = parent
812  sibling = sibling
813  child = first
815  sibling = NULL
816  When next cycle parent = new
819  If child == first Then
820  child = new
821  Else
822  next = child
823  When sibling != first cycle
824  next = sibling
825  sibling = new
827  Return NULL
Caller
NameDescribe
insert_resource_conflictsert_resource_conflict - Inserts resource in the resource tree*@parent: parent of the new resource*@new: new resource to insert* Returns 0 on success, conflict resource if the resource can't be inserted
insert_resource_expand_to_fitsert_resource_expand_to_fit - Insert a resource into the resource tree*@root: root resource descriptor*@new: new resource to insert* Insert a resource into the resource tree, possibly expanding it in order* to make it encompass any conflicting resources.