Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__bitmap_weight

Proto:int __bitmap_weight(const unsigned long *bitmap, unsigned int bits)

Type:int

Parameter:

TypeParameterName
const unsigned long *bitmap
unsigned intbits
269  lim = bits / BITS_PER_LONG
270  w = 0
272  When k < lim cycle w += hweight_long(bitmap[k])
275  If bits % BITS_PER_LONG Then w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits))
278  Return w
Caller
NameDescribe
bitmap_pos_to_ordmap_pos_to_ord - find ordinal of set bit at given position in bitmap*@buf: pointer to a bitmap*@pos: a bit position in @buf (0 <= @pos < @nbits)*@nbits: number of valid bit positions in @buf* Map the bit at position @pos in @buf (of length @nbits) to the
bitmap_weight