函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\resource.c Create Date:2022-07-27 10:05:05
Last Modify:2022-05-22 11:14:39 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:static struct resource *__insert_resource(struct resource *parent, struct resource *new)

返回类型:struct resource

参数:

类型参数名称
struct resource *parent
struct resource *new
785  循环
786  first等于Return the conflict entry if you can't request it
787  如果非first则返回:first
790  如果first恒等于parent则返回:first
792  如果WARN_ON(first == new)则返回:first
795  如果start大于startend小于end退出
797  如果start恒等于startend恒等于end退出
801  循环
803  如果start小于startend大于end则返回:next
805  如果非sibling退出
807  如果start大于end退出
811  parent等于parent
812  sibling等于sibling
813  child等于first
815  sibling = NULL
816 next循环parent等于new
819  如果child恒等于first
820  child等于new
821  否则
822  next等于child
823 sibling不等于first循环
824  next等于sibling
825  sibling等于new
827  返回:NULL
调用者
名称描述
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.