bitmap.h

来自「自己做的交叉编译工具!gcc-3.4.5,glibc-2.3.6在ubuntu8」· C头文件 代码 · 共 49 行

H
49
字号
#ifndef __LINUX_BITMAP_H#define __LINUX_BITMAP_H#ifndef __ASSEMBLY__#include <linux/types.h>#include <linux/bitops.h>int bitmap_empty(const unsigned long *bitmap, int bits);int bitmap_full(const unsigned long *bitmap, int bits);int bitmap_equal(const unsigned long *bitmap1,			unsigned long *bitmap2, int bits);void bitmap_complement(unsigned long *bitmap, int bits);static inline void bitmap_zero(unsigned long *bitmap, int bits){	memset(bitmap, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long));}static inline void bitmap_fill(unsigned long *bitmap, int bits){	memset(bitmap, 0xff, BITS_TO_LONGS(bits)*sizeof(unsigned long));}static inline void bitmap_copy(unsigned long *dst,			const unsigned long *src, int bits){	int len = BITS_TO_LONGS(bits)*sizeof(unsigned long);	memcpy(dst, src, len);}void bitmap_shift_right(unsigned long *dst,			const unsigned long *src, int shift, int bits);void bitmap_shift_left(unsigned long *dst,			const unsigned long *src, int shift, int bits);void bitmap_and(unsigned long *dst, const unsigned long *bitmap1,			const unsigned long *bitmap2, int bits);void bitmap_or(unsigned long *dst, const unsigned long *bitmap1,			const unsigned long *bitmap2, int bits);int bitmap_weight(const unsigned long *bitmap, int bits);int bitmap_scnprintf(char *buf, unsigned int buflen,			const unsigned long *maskp, int bits);int bitmap_parse(const char *ubuf, unsigned int ubuflen,			unsigned long *maskp, int bits);#endif /* __ASSEMBLY__ */#endif /* __LINUX_BITMAP_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?