kernel/inc/utils/bitmap.h

21 lines
593 B
C
Raw Permalink Normal View History

// This file is part of noxos and licensed under the MIT open source license
2023-02-05 13:39:35 +00:00
#ifndef NOX_BITMAP_H
#define NOX_BITMAP_H
#include "stdtypes.h"
typedef struct {
uint32_t size;
uint32_t size_bits;
2023-02-05 13:39:35 +00:00
uint8_t* buffer;
} bitmap_T;
bitmap_T bitmap_init_from_buffer (void* buffer, uint32_t size);
bitmap_T bitmap_init (uint32_t size);
void bitmap_destruct (bitmap_T* bitmap);
bool bitmap_set (bitmap_T* bitmap, uint32_t index, bool value);
bool bitmap_get (bitmap_T* bitmap, uint32_t index);
#endif //NOX_BITMAP_H