diff --git a/src/boot/pmm.c b/src/boot/pmm.c index 6eefed8..e6d297f 100644 --- a/src/boot/pmm.c +++ b/src/boot/pmm.c @@ -13,15 +13,15 @@ static u64 pmm_bitmap[BITMAP_SIZE]; static inline void bitmap_set(size_t bit) { - pmm_bitmap[bit / 64] |= (U64_C(1) << (bit % 64)); + pmm_bitmap[bit / 64] |= (1ULL << (bit % 64)); } static inline void bitmap_clear(size_t bit) { - pmm_bitmap[bit / 64] &= ~(U64_C(1) << (bit % 64)); + pmm_bitmap[bit / 64] &= ~(1ULL << (bit % 64)); } static inline int bitmap_test(size_t bit) { - return pmm_bitmap[bit / 64] & (U64_C(1) << (bit % 64)); + return pmm_bitmap[bit / 64] & (1ULL << (bit % 64)); } static inline size_t to_page(uptr addr) { diff --git a/src/shared/def.h b/src/shared/def.h index 9d6bd74..4a0ff5e 100644 --- a/src/shared/def.h +++ b/src/shared/def.h @@ -53,19 +53,7 @@ typedef signed long long i64; #define U64_MIN 0x0 #define U64_MAX 0xffffffffffffffffULL -#define I8_C(x) x -#define U8_C(x) x##U - -#define I16_C(x) x -#define U16_C(x) x##U - -#define I32_C(x) x -#define U32_C(x) x##U - -#define I64_C(x) x##LL -#define U64_C(x) x##ULL - -#define KiB(count) (U64_C(count) * U64_C(1024)) -#define MiB(count) (U64_C(count) * KiB(1024)) -#define GiB(count) (U64_C(count) * MiB(1024)) -#define TiB(count) (U64_C(count) * GiB(1024)) \ No newline at end of file +#define KiB(count) (count##ULL * 1024##ULL) +#define MiB(count) (count##ULL * KiB(1024)) +#define GiB(count) (count##ULL * MiB(1024)) +#define TiB(count) (count##ULL * GiB(1024)) \ No newline at end of file