函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:int allocate_resource(struct resource *root, struct resource *new, resource_size_t size, resource_size_t min, resource_size_t max, resource_size_t align, resource_size_tresource_size_tresource_size_t (*alignf)(void *, const struct resource *, , ), void *alignf_data)

返回类型:int

参数:

类型参数名称
struct resource *root
struct resource *new
resource_size_tsize
resource_size_tmin
resource_size_tmax
resource_size_talign
resource_size_t (*alignf
void *alignf_data
731  如果非alignfalignf等于simple_align_resource
734  min等于min
735  max等于max
736  align等于align
737  alignf等于alignf
738  alignf_data等于alignf_data
740  如果parent
743  返回:allocate_resource - allocate a slot in the resource tree given range & alignment
746  write_lock( & resource_lock)
747  err等于Find empty slot in the resource tree given range and alignment.
748  如果err大于等于0且Return the conflict entry if you can't request it err等于负EBUSY
750  write_unlock( & resource_lock)
751  返回:err