#ifndef _KERNEL_LIBK_BM_H
#define _KERNEL_LIBK_BM_H

#include <libk/std.h>

struct bm {
  uint8_t* base;
  size_t nbits;
};

void bm_init (struct bm* bm, uint8_t* base, size_t nbits);
void bm_set (struct bm* bm, size_t k);
bool bm_set_region (struct bm* bm, size_t k, size_t m);
void bm_clear (struct bm* bm, size_t k);
void bm_clear_region (struct bm* bm, size_t k, size_t m);
bool bm_test (struct bm* bm, size_t k);
bool bm_test_region (struct bm* bm, size_t k, size_t m);

#endif // _KERNEL_LIBK_BM_H
