函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__bitmap_weight

函数原型:int __bitmap_weight(const unsigned long *bitmap, unsigned int bits)

返回类型:int

参数:

类型参数名称
const unsigned long *bitmap
unsigned intbits
269  lim等于bitsBITS_PER_LONG
270  w等于0
272 k小于lim循环w加等于hweight_long(bitmap[k])
275  如果bits取模BITS_PER_LONGw加等于hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits))
278  返回:w
调用者
名称描述
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