PatchworkOS
321f6ec
A non-POSIX operating system.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
bitmap_is_set.c
Go to the documentation of this file.
1
#include <
sys/bitmap.h
>
2
3
bool
bitmap_is_set
(
bitmap_t
*
map
,
uint64_t
idx)
4
{
5
if
(idx >=
map
->
length
)
6
{
7
return
false
;
8
}
9
10
uint64_t
qwordIdx = idx / 64;
11
uint64_t
bitInQword = idx % 64;
12
return
(
map
->buffer[qwordIdx] & (1ULL << bitInQword));
13
}
bitmap.h
bitmap_is_set
bool bitmap_is_set(bitmap_t *map, uint64_t idx)
Check if a bit is set in the bitmap.
Definition
bitmap_is_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_is_set.c
Generated on Mon Dec 15 2025 15:56:54 for PatchworkOS by
1.9.8