PatchworkOS
321f6ec
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
bitmap_set.c
Go to the documentation of this file.
1
#include <
sys/bitmap.h
>
2
3
void
bitmap_set
(
bitmap_t
*
map
,
uint64_t
index)
4
{
5
if
(index >=
map
->
length
)
6
{
7
return
;
8
}
9
10
uint64_t
qwordIdx = index / 64;
11
uint64_t
bitInQword = index % 64;
12
map
->buffer[qwordIdx] |= (1ULL << bitInQword);
13
}
bitmap.h
bitmap_set
void bitmap_set(bitmap_t *map, uint64_t index)
Set a bit in the bitmap.
Definition
bitmap_set.c:3
map
boot_memory_map_t * map
Definition
mem.c:19
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
bitmap_t
Bitmap structure.
Definition
bitmap.h:22
boot_memory_map_t::length
uint64_t length
Definition
boot_info.h:58
src
libstd
functions
bitmap
bitmap_set.c
Generated on Mon Dec 15 2025 15:56:54 for PatchworkOS by
1.9.8