ArvernOS
Loading...
Searching...
No Matches
bitmap.h File Reference
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for bitmap.h:
This graph shows which files directly or indirectly include this file:

Typedefs

typedef uint64_t bitmap_t
 This type represents a bitmap (bitset).
 

Functions

bool bitmap_get (const bitmap_t *b, uint64_t n)
 
void bitmap_set (bitmap_t *b, uint64_t n)
 
void bitmap_clear (bitmap_t *b, uint64_t n)
 

Function Documentation

◆ bitmap_clear()

void bitmap_clear ( bitmap_t * b,
uint64_t n )

Clears a bit (sets it to false).

Parameters
ba bitmap
nthe bit to clear

◆ bitmap_get()

bool bitmap_get ( const bitmap_t * b,
uint64_t n )

Returns true when the bit is set, false otherwise.

Parameters
ba bitmap
nthe bit to check
Returns
true when the bit to check is set, false otherwise

◆ bitmap_set()

void bitmap_set ( bitmap_t * b,
uint64_t n )

Sets a bit (sets it to true).

Parameters
ba bitmap
nthe bit to set