MOS Source Code
Loading...
Searching...
No Matches
bitmap.c File Reference
#include <mos/lib/structures/bitmap.h>
#include <mos_stdlib.h>
#include <mos_string.h>
+ Include dependency graph for bitmap.c:

Go to the source code of this file.

Functions

bitmap_line_tbitmap_create (size_t size)
 
void bitmap_zero (bitmap_line_t *bitmap, size_t bitmap_nlines)
 
bool bitmap_set (bitmap_line_t *bitmap, size_t bitmap_nlines, size_t index)
 
bool bitmap_clear (bitmap_line_t *bitmap, size_t bitmap_nlines, size_t index)
 
bool bitmap_get (const bitmap_line_t *bitmap, size_t bitmap_nlines, size_t index)
 
size_t bitmap_find_first_free_n (bitmap_line_t *bitmap, size_t bitmap_nlines, size_t begin_bit, size_t n_bits)
 
void bitmap_set_range (bitmap_line_t *bitmap, size_t bitmap_nlines, size_t start_bit, size_t end_bit, bool value)
 

Function Documentation

◆ bitmap_create()

bitmap_line_t * bitmap_create ( size_t size)

Definition at line 7 of file bitmap.c.

+ Here is the call graph for this function:

◆ bitmap_zero()

void bitmap_zero ( bitmap_line_t * bitmap,
size_t bitmap_nlines )

Definition at line 15 of file bitmap.c.

Referenced by bitmap_create().

◆ bitmap_set()

bool bitmap_set ( bitmap_line_t * bitmap,
size_t bitmap_nlines,
size_t index )

Definition at line 20 of file bitmap.c.

+ Here is the call graph for this function:

◆ bitmap_clear()

bool bitmap_clear ( bitmap_line_t * bitmap,
size_t bitmap_nlines,
size_t index )

Definition at line 33 of file bitmap.c.

+ Here is the call graph for this function:

◆ bitmap_get()

bool bitmap_get ( const bitmap_line_t * bitmap,
size_t bitmap_nlines,
size_t index )

Definition at line 46 of file bitmap.c.

Referenced by bitmap_clear(), bitmap_find_first_free_n(), and bitmap_set().

◆ bitmap_find_first_free_n()

size_t bitmap_find_first_free_n ( bitmap_line_t * bitmap,
size_t bitmap_nlines,
size_t begin_bit,
size_t n_bits )

Definition at line 55 of file bitmap.c.

+ Here is the call graph for this function:

◆ bitmap_set_range()

void bitmap_set_range ( bitmap_line_t * bitmap,
size_t bitmap_nlines,
size_t start_bit,
size_t end_bit,
bool value )

Definition at line 105 of file bitmap.c.