函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:allocate_resource - allocate a slot in the resource tree given range & alignment

函数原型:static int reallocate_resource(struct resource *root, struct resource *old, resource_size_t newsize, struct resource_constraint *constraint)

返回类型:int

参数:

类型参数名称
struct resource *root
struct resource *old
resource_size_tnewsize
struct resource_constraint *constraint
672  err等于0
673  new等于old
676  write_lock( & resource_lock)
678  如果err等于Find empty slot in the resource tree with the given range and* alignment constraints则转到:out
681  如果True iff r1 completely contains r2
682  start等于start
683  end等于end
684  转到:out
687  如果child
688  err等于负EBUSY
689  转到:out
692  如果True iff r1 completely contains r2
693  start等于start
694  end等于end
695  否则
696  __release_resource(old, true)
697  old等于new
698  conflict等于Return the conflict entry if you can't request it
699  BUG_ON(conflict)
701  out :
702  write_unlock( & resource_lock)
703  返回:err
调用者
名称描述
allocate_resourceallocate_resource - allocate empty slot in the resource tree given range & alignment