Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__bitmap_shift_left - logical left shift of the bits in a bitmap*@dst : destination bitmap*@src : source bitmap*@shift : shift by this many bits*@nbits : bitmap size, in bits* Shifting left (multiplying) means moving bits in the LS -> MS* direction

Proto:void __bitmap_shift_left(unsigned long *dst, const unsigned long *src, unsigned int shift, unsigned int nbits)

Type:void

Parameter:

TypeParameterName
unsigned long *dst
const unsigned long *src
unsigned intshift
unsigned intnbits
150  lim = BITS_TO_LONGS(nbits)
151  off = shift / BITS_PER_LONG , rem = shift % BITS_PER_LONG
152  When k >= 0 cycle
159  If rem && k > 0 Then lower = src[k - 1] >> BITS_PER_LONG - rem
161  Else lower = 0
163  upper = src[k] << rem
164  dst[k + off] = lower | upper
166  If off Then memset(dst, 0, off * sizeof(unsignedlong))
Caller
NameDescribe
__bitmap_parse__bitmap_parse - convert an ASCII hex string into a bitmap