Motr
M0
|
#include "lib/bitmap.h"
#include "lib/misc.h"
#include "lib/assert.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/trace.h"
Go to the source code of this file.
Macros | |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LIB |
#define | M0_BITMAP_WORDS(nr) (((nr) + (M0_BITMAP_BITS-1)) >> M0_BITMAP_BITSHIFT) |
#define | M0_BITMAP_SHIFT(idx) ((idx) >> M0_BITMAP_BITSHIFT) |
#define | M0_BITMAP_MASK(idx) (1UL << ((idx) & (M0_BITMAP_BITS-1))) |
Enumerations | |
enum | { M0_BITMAP_BITS = (8 * sizeof ((struct m0_bitmap *)0)->b_words[0]), M0_BITMAP_BITSHIFT = 6 } |
Functions | |
M0_BASSERT (M0_BITMAP_BITS==(1UL<< M0_BITMAP_BITSHIFT)) | |
M0_BASSERT (M0_BITMAP_WORDS(0)==0) | |
M0_BASSERT (M0_BITMAP_WORDS(1)==1) | |
M0_BASSERT (M0_BITMAP_WORDS(63)==1) | |
M0_BASSERT (M0_BITMAP_WORDS(64)==1) | |
M0_BASSERT (M0_BITMAP_WORDS(65)==2) | |
M0_INTERNAL int | m0_bitmap_init (struct m0_bitmap *map, size_t nr) |
M0_INTERNAL void | m0_bitmap_fini (struct m0_bitmap *map) |
M0_INTERNAL bool | m0_bitmap_get (const struct m0_bitmap *map, size_t idx) |
M0_INTERNAL int | m0_bitmap_ffs (const struct m0_bitmap *map) |
M0_INTERNAL int | m0_bitmap_ffz (const struct m0_bitmap *map) |
M0_INTERNAL void | m0_bitmap_set (struct m0_bitmap *map, size_t idx, bool val) |
M0_INTERNAL void | m0_bitmap_reset (struct m0_bitmap *map) |
M0_INTERNAL void | m0_bitmap_copy (struct m0_bitmap *dst, const struct m0_bitmap *src) |
M0_INTERNAL size_t | m0_bitmap_set_nr (const struct m0_bitmap *map) |
M0_INTERNAL int | m0_bitmap_onwire_init (struct m0_bitmap_onwire *ow_map, size_t nr) |
M0_INTERNAL void | m0_bitmap_onwire_fini (struct m0_bitmap_onwire *ow_map) |
M0_INTERNAL void | m0_bitmap_store (const struct m0_bitmap *im_map, struct m0_bitmap_onwire *ow_map) |
M0_INTERNAL void | m0_bitmap_load (const struct m0_bitmap_onwire *ow_map, struct m0_bitmap *im_map) |