aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/user/main.cpp
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2025-05-18 14:45:05 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2025-05-18 14:46:17 +0000
commit8d39f3f67734bf39cada370c39243e6ef33bf4a0 (patch)
tree50493df40018c2ea9587280ac8d7bc3fb42a4990 /arch/x86_64/src/user/main.cpp
parent1b5a771a34743a2973a82de5ebdfd22da030b841 (diff)
downloadteachos-8d39f3f67734bf39cada370c39243e6ef33bf4a0.tar.xz
teachos-8d39f3f67734bf39cada370c39243e6ef33bf4a0.zip
Make new usable for both kernel and user calls
Diffstat (limited to 'arch/x86_64/src/user/main.cpp')
-rw-r--r--arch/x86_64/src/user/main.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86_64/src/user/main.cpp b/arch/x86_64/src/user/main.cpp
index e621327..8b07e4a 100644
--- a/arch/x86_64/src/user/main.cpp
+++ b/arch/x86_64/src/user/main.cpp
@@ -12,8 +12,7 @@ namespace teachos::arch::user
{
auto main() -> void
{
- // Test writing to VGA Buffer
- char constexpr syscall_message[] = "Successfully entered user mode and wrote to VGA buffer via syscall!";
+ constexpr char syscall_message[] = "Successfully entered user mode and wrote to VGA buffer via syscall!";
context_switching::syscall::syscall(context_switching::syscall::type::WRITE,
{reinterpret_cast<uint64_t>(&syscall_message)});
@@ -26,8 +25,7 @@ namespace teachos::arch::user
item.exchange(max_value + 2);
});
- // Test user heap
- auto address = memory::heap::global_heap_allocator::malloc(8U);
+ auto address = new uint64_t{10U};
(void)address;
for (;;)