My Kernel v0.1.0
bitmap.h File Reference

Bitmap. More...

#include <kernel/types.h>
#include <utils/bits.h>
#include <utils/compiler.h>
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for bitmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BITMAP(_name, _size)    bitmap_block_t _name[BITMAP_OFFSET(NON_ZERO(_size) - 1) + 1]
 Declare a bitmap variable of a given size.
 

Typedefs

typedef native_t bitmap_block_t
 Basic unit used by the bitmap. More...
 
typedef bitmap_block_tbitmap_t
 A bitmap instance A bitmap is just a simple list of bytes (bitmap_block_t)
 

Functions

static ALWAYS_INLINE bool bitmap_read (const bitmap_t bitmap, uint32_t index)
 Read the value at a given index inside a bitmap. More...
 
static ALWAYS_INLINE void bitmap_set (bitmap_t bitmap, uint32_t index)
 Set a value at a given index inside a bitmap as present. More...
 
static ALWAYS_INLINE void bitmap_clear (bitmap_t bitmap, uint32_t index)
 Set a value at a given index inside a bitmap as absent. More...
 
static ALWAYS_INLINE void bitmap_assign (bitmap_t bitmap, uint32_t index, bool value)
 Set a value at a given index inside a bitmap to the given value. More...
 

Detailed Description