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

Go to the source code of this file.

Macros

#define for_each_set_bit(bit, addr, size)
 
#define for_each_set_bit_from(bit, addr, size)
 
#define for_each_clear_bit(bit, addr, size)
 
#define for_each_clear_bit_from(bit, addr, size)
 

Functions

unsigned int __sw_hweight8 (unsigned int w)
 
unsigned int __sw_hweight16 (unsigned int w)
 
unsigned int __sw_hweight32 (unsigned int w)
 
unsigned long __sw_hweight64 (__u64 w)
 

Macro Definition Documentation

#define for_each_clear_bit (   bit,
  addr,
  size 
)
Value:
for ((bit) = find_first_zero_bit((addr), (size)); \
(bit) < (size); \
(bit) = find_next_zero_bit((addr), (size), (bit) + 1))

Definition at line 35 of file bitops.h.

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

Definition at line 41 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 24 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 30 of file bitops.h.

Function Documentation

unsigned int __sw_hweight16 ( unsigned int  w)

Definition at line 29 of file hweight.c.

unsigned int __sw_hweight32 ( unsigned int  w)

hweightN - returns the hamming weight of a N-bit word : the word to weigh

The Hamming Weight of a number is the total number of bits set in it.

Definition at line 12 of file hweight.c.

unsigned long __sw_hweight64 ( __u64  w)

Definition at line 46 of file hweight.c.

unsigned int __sw_hweight8 ( unsigned int  w)

Definition at line 38 of file hweight.c.