函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__bitmap_shift_right - logical right 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 right (dividing) means moving bits in the MS -> LS bit* direction

函数原型:void __bitmap_shift_right(unsigned long *dst, const unsigned long *src, unsigned shift, unsigned nbits)

返回类型:void

参数:

类型参数名称
unsigned long *dst
const unsigned long *src
unsignedshift
unsignednbits
104  lim等于BITS_TO_LONGS(nbits)
105  off等于shiftBITS_PER_LONG, rem等于shift取模BITS_PER_LONG
106  mask等于BITMAP_LAST_WORD_MASK(nbits)
107 offk小于lim循环
114  如果非remoffk加1大于等于limupper等于0
116  否则
117  upper等于src[off + k + 1]
118  如果offk加1恒等于lim减1则upper与等于mask
120  upper左移等于BITS_PER_LONGrem
122  lower等于src[off + k]
123  如果offk恒等于lim减1则lower与等于mask
125  lower右移等于rem
126  dst[k]等于lower按位或upper
128  如果offmemset( & dst[lim - off], 0, off * sizeof(unsignedlong))