Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
bitops.h File Reference
#include <linux/kernel.h>
#include <linux/compiler.h>
#include <asm/hweight.h>

Go to the source code of this file.

Macros

#define __WORDSIZE   (__SIZEOF_LONG__ * 8)
 
#define BITS_PER_LONG   __WORDSIZE
 
#define BITS_PER_BYTE   8
 
#define BITS_TO_LONGS(nr)   DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
 
#define BITS_TO_U64(nr)   DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64))
 
#define BITS_TO_U32(nr)   DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32))
 
#define for_each_set_bit(bit, addr, size)
 
#define for_each_set_bit_from(bit, addr, size)
 
#define BITOP_WORD(nr)   ((nr) / BITS_PER_LONG)
 

Macro Definition Documentation

#define __WORDSIZE   (__SIZEOF_LONG__ * 8)

Definition at line 9 of file bitops.h.

#define BITOP_WORD (   nr)    ((nr) / BITS_PER_LONG)

Definition at line 50 of file bitops.h.

#define BITS_PER_BYTE   8

Definition at line 13 of file bitops.h.

#define BITS_PER_LONG   __WORDSIZE

Definition at line 12 of file bitops.h.

#define BITS_TO_LONGS (   nr)    DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))

Definition at line 14 of file bitops.h.

#define BITS_TO_U32 (   nr)    DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32))

Definition at line 16 of file bitops.h.

#define BITS_TO_U64 (   nr)    DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64))

Definition at line 15 of file bitops.h.

#define for_each_set_bit (   bit,
  addr,
  size 
)
Value:
for ((bit) = find_first_bit((addr), (size)); \
(bit) < (size); \
(bit) = find_next_bit((addr), (size), (bit) + 1))

Definition at line 18 of file bitops.h.

#define for_each_set_bit_from (   bit,
  addr,
  size 
)
Value:
for ((bit) = find_next_bit((addr), (size), (bit)); \
(bit) < (size); \
(bit) = find_next_bit((addr), (size), (bit) + 1))

Definition at line 24 of file bitops.h.