MOS Source Code
Loading...
Searching...
No Matches
bitmap.h File Reference
#include <mos/moslib_global.h>
#include <mos/types.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_LINE_BITS   (sizeof(bitmap_line_t) * 8)
 
#define BITMAP_LINE_COUNT(size)
 

Typedefs

typedef u32 bitmap_line_t
 

Functions

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

Macro Definition Documentation

◆ BITMAP_LINE_BITS

#define BITMAP_LINE_BITS   (sizeof(bitmap_line_t) * 8)

◆ BITMAP_LINE_COUNT

#define BITMAP_LINE_COUNT ( size)
Value:
#define BITMAP_LINE_BITS
Definition bitmap.h:10
#define ALIGN_UP(addr, size)
Definition mos_global.h:73
size_t size
Definition slab.c:30

Definition at line 11 of file bitmap.h.

Referenced by bitmap_create().

Typedef Documentation

◆ bitmap_line_t

typedef u32 bitmap_line_t

Definition at line 8 of file bitmap.h.

Function Documentation

◆ bitmap_create()

MOSAPI 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()

MOSAPI 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()

MOSAPI 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()

MOSAPI 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_set_range()

MOSAPI void bitmap_set_range ( bitmap_line_t * bitmap,
size_t bitmap_nlines,
size_t start,
size_t end,
bool value )

Definition at line 105 of file bitmap.c.

◆ bitmap_get()

MOSAPI 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()

MOSAPI 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: