LF OS
Hobby operating system for amd64 with high ambitions
Loading...
Searching...
No Matches
bitmap.h File Reference

(29312b1 fbconsole, panic: render panic after framebuffer was given to userspace - without clearing screen contents)

#include <stdint.h>
#include <stdbool.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.

Typedefs

typedef uint8_tbitmap_t
 Type for a single entry in the array.
 

Functions

static size_t bitmap_size (size_t num_entries)
 Return the size of the bitmap in bytes for a given amount of entries.
 
static uint64_t bitmap_idx (uint64_t entry)
 Return the index in the bitmap array for the given bitmap index.
 
static uint8_t bitmap_bit (uint64_t entry)
 Return the bitmask for the given bitmap index.
 
static bool bitmap_get (bitmap_t bitmap, uint64_t entry)
 Retrieve state of the given entry from bitmap.
 
static void bitmap_set (bitmap_t bitmap, uint64_t entry)
 Set given entry in bitmap.
 
static void bitmap_clear (bitmap_t bitmap, uint64_t entry)
 Unset given entry in bitmap.
 

Typedef Documentation

◆ bitmap_t

typedef uint8_t* bitmap_t

Type for a single entry in the array.

Definition at line 8 of file bitmap.h.

Function Documentation

◆ bitmap_bit()

static uint8_t bitmap_bit ( uint64_t  entry)
inlinestatic

Return the bitmask for the given bitmap index.

Definition at line 21 of file bitmap.h.

References entry.

+ Here is the caller graph for this function:

◆ bitmap_clear()

static void bitmap_clear ( bitmap_t  bitmap,
uint64_t  entry 
)
inlinestatic

Unset given entry in bitmap.

Definition at line 36 of file bitmap.h.

References bitmap_idx(), and entry.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bitmap_get()

static bool bitmap_get ( bitmap_t  bitmap,
uint64_t  entry 
)
inlinestatic

Retrieve state of the given entry from bitmap.

Definition at line 26 of file bitmap.h.

References bitmap_bit(), bitmap_idx(), and entry.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bitmap_idx()

static uint64_t bitmap_idx ( uint64_t  entry)
inlinestatic

Return the index in the bitmap array for the given bitmap index.

Definition at line 16 of file bitmap.h.

References entry.

+ Here is the caller graph for this function:

◆ bitmap_set()

static void bitmap_set ( bitmap_t  bitmap,
uint64_t  entry 
)
inlinestatic

Set given entry in bitmap.

Definition at line 31 of file bitmap.h.

References bitmap_bit(), bitmap_idx(), and entry.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bitmap_size()

static size_t bitmap_size ( size_t  num_entries)
inlinestatic

Return the size of the bitmap in bytes for a given amount of entries.

Definition at line 11 of file bitmap.h.

+ Here is the caller graph for this function: