函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:map_clear_ll - clear 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* Clear @nr bits start from @start in @map lock-lessly. Several users

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

返回类型:int

参数:

类型参数名称
unsigned long *map
intstart
intnr
121  p等于mapBIT_WORD(start)
122  size等于startnr
123  bits_to_clear等于BITS_PER_LONGstart取模BITS_PER_LONG
124  mask_to_clear等于BITMAP_FIRST_WORD_MASK(start)
126 nrbits_to_clear大于等于0循环
127  如果clear_bits_ll(p, mask_to_clear)则返回:nr
129  nr减等于bits_to_clear
130  bits_to_clear等于BITS_PER_LONG
131  mask_to_clear等于0UL的反
132  p自加
134  如果nr
135  mask_to_clear与等于BITMAP_LAST_WORD_MASK(size)
136  如果clear_bits_ll(p, mask_to_clear)则返回:nr
140  返回: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
gen_pool_free_ownergen_pool_free_owner - free allocated special memory back to the pool*@pool: pool to free to*@addr: starting address of memory to free back to pool*@size: size in bytes of memory to free*@owner: private data stashed at gen_pool_add() time* Free previously