函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\genalloc.c Create Date:2022-07-27 07:54:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:map_set_ll - set the specified number of bits at the specified position*@map: pointer to a bitmap*@start: a bit position in @map*@nr: number of bits to set* Set @nr bits start from @start in @map lock-lessly. Several users

函数原型:static int bitmap_set_ll(unsigned long *map, int start, int nr)

返回类型:int

参数:

类型参数名称
unsigned long *map
intstart
intnr
86  p等于mapBIT_WORD(start)
87  size等于startnr
88  bits_to_set等于BITS_PER_LONGstart取模BITS_PER_LONG
89  mask_to_set等于BITMAP_FIRST_WORD_MASK(start)
91 nrbits_to_set大于等于0循环
92  如果set_bits_ll(p, mask_to_set)则返回:nr
94  nr减等于bits_to_set
95  bits_to_set等于BITS_PER_LONG
96  mask_to_set等于0UL的反
97  p自加
99  如果nr
100  mask_to_set与等于BITMAP_LAST_WORD_MASK(size)
101  如果set_bits_ll(p, mask_to_set)则返回:nr
105  返回:0
调用者
名称描述
gen_pool_alloc_algo_ownergen_pool_alloc_algo_owner - allocate special memory from the pool*@pool: pool to allocate from*@size: number of bytes to allocate from the pool*@algo: algorithm passed from caller*@data: data passed to algorithm*@owner: optionally retrieve the chunk owner