Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\genalloc.c Create Date:2022-07-28 06:56:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:static int bitmap_clear_ll(unsigned long *map, int start, int nr)

Type:int

Parameter:

TypeParameterName
unsigned long *map
intstart
intnr
121  p = map + BIT_WORD(start)
122  size = start + nr
123  bits_to_clear = BITS_PER_LONG - start % BITS_PER_LONG
124  mask_to_clear = BITMAP_FIRST_WORD_MASK(start)
126  When nr - bits_to_clear >= 0 cycle
127  If clear_bits_ll(p, mask_to_clear) Then Return nr
129  nr -= bits_to_clear
130  bits_to_clear = BITS_PER_LONG
131  mask_to_clear = ~0UL
132  p++
134  If nr Then
135  mask_to_clear &= BITMAP_LAST_WORD_MASK(size)
136  If clear_bits_ll(p, mask_to_clear) Then Return nr
140  Return 0
Caller
NameDescribe
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