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

Go to the source code of this file.

Data Structures

struct  ebitmap_node
 
struct  ebitmap
 

Macros

#define EBITMAP_UNIT_NUMS
 
#define EBITMAP_UNIT_SIZE   BITS_PER_LONG
 
#define EBITMAP_SIZE   (EBITMAP_UNIT_NUMS * EBITMAP_UNIT_SIZE)
 
#define EBITMAP_BIT   1ULL
 
#define EBITMAP_SHIFT_UNIT_SIZE(x)   (((x) >> EBITMAP_UNIT_SIZE / 2) >> EBITMAP_UNIT_SIZE / 2)
 
#define ebitmap_length(e)   ((e)->highbit)
 
#define EBITMAP_NODE_INDEX(node, bit)   (((bit) - (node)->startbit) / EBITMAP_UNIT_SIZE)
 
#define EBITMAP_NODE_OFFSET(node, bit)   (((bit) - (node)->startbit) % EBITMAP_UNIT_SIZE)
 
#define ebitmap_for_each_positive_bit(e, n, bit)
 

Functions

int ebitmap_cmp (struct ebitmap *e1, struct ebitmap *e2)
 
int ebitmap_cpy (struct ebitmap *dst, struct ebitmap *src)
 
int ebitmap_contains (struct ebitmap *e1, struct ebitmap *e2)
 
int ebitmap_get_bit (struct ebitmap *e, unsigned long bit)
 
int ebitmap_set_bit (struct ebitmap *e, unsigned long bit, int value)
 
void ebitmap_destroy (struct ebitmap *e)
 
int ebitmap_read (struct ebitmap *e, void *fp)
 
int ebitmap_write (struct ebitmap *e, void *fp)
 

Macro Definition Documentation

#define EBITMAP_BIT   1ULL

Definition at line 23 of file ebitmap.h.

#define ebitmap_for_each_positive_bit (   e,
  n,
  bit 
)
Value:
for (bit = ebitmap_start_positive(e, &n); \
bit < ebitmap_length(e); \
bit = ebitmap_next_positive(e, &n, bit)) \

Definition at line 113 of file ebitmap.h.

#define ebitmap_length (   e)    ((e)->highbit)

Definition at line 38 of file ebitmap.h.

#define EBITMAP_NODE_INDEX (   node,
  bit 
)    (((bit) - (node)->startbit) / EBITMAP_UNIT_SIZE)

Definition at line 76 of file ebitmap.h.

#define EBITMAP_NODE_OFFSET (   node,
  bit 
)    (((bit) - (node)->startbit) % EBITMAP_UNIT_SIZE)

Definition at line 78 of file ebitmap.h.

#define EBITMAP_SHIFT_UNIT_SIZE (   x)    (((x) >> EBITMAP_UNIT_SIZE / 2) >> EBITMAP_UNIT_SIZE / 2)

Definition at line 24 of file ebitmap.h.

#define EBITMAP_SIZE   (EBITMAP_UNIT_NUMS * EBITMAP_UNIT_SIZE)

Definition at line 22 of file ebitmap.h.

#define EBITMAP_UNIT_NUMS
Value:
((32 - sizeof(void *) - sizeof(u32)) \
/ sizeof(unsigned long))

Definition at line 19 of file ebitmap.h.

#define EBITMAP_UNIT_SIZE   BITS_PER_LONG

Definition at line 21 of file ebitmap.h.

Function Documentation

int ebitmap_cmp ( struct ebitmap e1,
struct ebitmap e2 
)

Definition at line 27 of file ebitmap.c.

int ebitmap_contains ( struct ebitmap e1,
struct ebitmap e2 
)

Definition at line 216 of file ebitmap.c.

int ebitmap_cpy ( struct ebitmap dst,
struct ebitmap src 
)

Definition at line 49 of file ebitmap.c.

void ebitmap_destroy ( struct ebitmap e)

Definition at line 331 of file ebitmap.c.

int ebitmap_get_bit ( struct ebitmap e,
unsigned long  bit 
)

Definition at line 246 of file ebitmap.c.

int ebitmap_read ( struct ebitmap e,
void fp 
)

Definition at line 350 of file ebitmap.c.

int ebitmap_set_bit ( struct ebitmap e,
unsigned long  bit,
int  value 
)

Definition at line 263 of file ebitmap.c.

int ebitmap_write ( struct ebitmap e,
void fp 
)

Definition at line 452 of file ebitmap.c.