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_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

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

Type:int

Parameter:

TypeParameterName
unsigned long *map
intstart
intnr
86  p = map + BIT_WORD(start)
87  size = start + nr
88  bits_to_set = BITS_PER_LONG - start % BITS_PER_LONG
89  mask_to_set = BITMAP_FIRST_WORD_MASK(start)
91  When nr - bits_to_set >= 0 cycle
92  If set_bits_ll(p, mask_to_set) Then Return nr
94  nr -= bits_to_set
95  bits_to_set = BITS_PER_LONG
96  mask_to_set = ~0UL
97  p++
99  If nr Then
100  mask_to_set &= BITMAP_LAST_WORD_MASK(size)
101  If set_bits_ll(p, mask_to_set) Then Return nr
105  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