28#include "../../../../common/util.h"
31typedef uint32_t bitmap_cell_t;
32typedef uint16_t bitmap_size_t;
33typedef int32_t bitmap_bitn_t;
36#if defined(SEAP_THREAD_SAFE)
40 bitmap_size_t realsize;
45#if defined(SEAP_THREAD_SAFE)
46# define BITMAP_INITIALIZER { 0, 128, 0, NULL, 0 }
48# define BITMAP_INITIALIZER { 128, 0, NULL, 0 }
51#define BITMAP_CELLSIZE (sizeof (bitmap_cell_t) * 8)
53bitmap_t *bitmap_new (bitmap_size_t size);
54int *bitmap_init (
bitmap_t *bitmap, bitmap_size_t size);
55int *bitmap_reinit (
bitmap_t *bitmap, bitmap_size_t size);
56int bitmap_set (
bitmap_t *bitmap, bitmap_bitn_t bitn);
57int bitmap_cas (
bitmap_t *bitmap, bitmap_bitn_t bitn,
int v);
58int bitmap_unset (
bitmap_t *bitmap, bitmap_bitn_t bitn);
60bitmap_bitn_t bitmap_setfree (
bitmap_t *bitmap);
61bitmap_bitn_t bitmap_getfree (
bitmap_t *bitmap);