diff --git a/kernel/src/MemoryManager.cpp b/kernel/src/MemoryManager.cpp index f1ae9961..63153a92 100644 --- a/kernel/src/MemoryManager.cpp +++ b/kernel/src/MemoryManager.cpp @@ -157,7 +157,7 @@ namespace MemoryManager return {}; } - Result remap(u64 address, size_t count, int flags) + Result remap(u64 address, usize count, int flags) { check(is_aligned(address, MMU::page_size())); @@ -170,7 +170,7 @@ namespace MemoryManager return {}; } - Result remap_unaligned(u64 address, size_t count, int flags) + Result remap_unaligned(u64 address, usize count, int flags) { if (!is_aligned(address, MMU::page_size())) count++; address = align_down(address, MMU::page_size()); diff --git a/kernel/src/MemoryManager.h b/kernel/src/MemoryManager.h index ab516b5b..d1ca0f5f 100644 --- a/kernel/src/MemoryManager.h +++ b/kernel/src/MemoryManager.h @@ -14,8 +14,8 @@ namespace MemoryManager void lock_page(u64 page); void lock_pages(u64 pages, u64 count); - Result remap(u64 address, size_t count, int flags); - Result remap_unaligned(u64 address, size_t count, int flags); + Result remap(u64 address, usize count, int flags); + Result remap_unaligned(u64 address, usize count, int flags); u64 free(); u64 used(); diff --git a/kernel/src/arch/MMU.h b/kernel/src/arch/MMU.h index 624427f6..b0ccc8b3 100644 --- a/kernel/src/arch/MMU.h +++ b/kernel/src/arch/MMU.h @@ -29,5 +29,5 @@ namespace MMU Result create_page_directory_for_userspace(); void setup_initial_page_directory(); - size_t page_size(); + usize page_size(); } \ No newline at end of file diff --git a/kernel/src/arch/Serial.cpp b/kernel/src/arch/Serial.cpp index 958557f6..ddf3a879 100644 --- a/kernel/src/arch/Serial.cpp +++ b/kernel/src/arch/Serial.cpp @@ -2,7 +2,7 @@ namespace Serial { - void write(const char* str, size_t size) + void write(const char* str, usize size) { while (size--) putchar(*str++); } diff --git a/kernel/src/arch/Serial.h b/kernel/src/arch/Serial.h index 031aaac0..8d7b18aa 100644 --- a/kernel/src/arch/Serial.h +++ b/kernel/src/arch/Serial.h @@ -4,7 +4,7 @@ namespace Serial { void putchar(u8 c); - void write(const char* str, size_t size); + void write(const char* str, usize size); void print(const char* str); void println(const char* str); } \ No newline at end of file diff --git a/kernel/src/arch/x86_64/MMU.cpp b/kernel/src/arch/x86_64/MMU.cpp index e259eb47..fda4c36c 100644 --- a/kernel/src/arch/x86_64/MMU.cpp +++ b/kernel/src/arch/x86_64/MMU.cpp @@ -52,7 +52,7 @@ static_assert(sizeof(PageDirectory) == PAGE_SIZE); namespace MMU { - size_t page_size() + usize page_size() { return PAGE_SIZE; } diff --git a/luna/Types.h b/luna/Types.h index c45e4448..ad06edfe 100644 --- a/luna/Types.h +++ b/luna/Types.h @@ -8,4 +8,6 @@ typedef uint64_t u64; typedef int8_t i8; typedef int16_t i16; typedef int32_t i32; -typedef int64_t i64; \ No newline at end of file +typedef int64_t i64; +typedef size_t usize; +typedef long isize; \ No newline at end of file