Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
bitmap.h File Reference
#include <string.h>
#include <linux/bitops.h>

Go to the source code of this file.

Macros

#define BITMAP_LAST_WORD_MASK(nbits)
 
#define small_const_nbits(nbits)   (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)
 

Functions

int __bitmap_weight (const unsigned long *bitmap, int bits)
 
void __bitmap_or (unsigned long *dst, const unsigned long *bitmap1, const unsigned long *bitmap2, int bits)
 

Macro Definition Documentation

#define BITMAP_LAST_WORD_MASK (   nbits)
Value:
( \
((nbits) % BITS_PER_LONG) ? \
(1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL \
)

Definition at line 11 of file bitmap.h.

#define small_const_nbits (   nbits)    (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)

Definition at line 17 of file bitmap.h.

Function Documentation

void __bitmap_or ( unsigned long dst,
const unsigned long bitmap1,
const unsigned long bitmap2,
int  bits 
)

Definition at line 197 of file bitmap.c.

int __bitmap_weight ( const unsigned long bitmap,
int  bits 
)

Definition at line 262 of file bitmap.c.