diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-05-16 09:58:57 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-05-16 09:58:57 +0000 |
| commit | d4cc546df6eba2dd287785f1a63fbcce4a1b9bc0 (patch) | |
| tree | a22b7a91ac0f55c37dbee6516bf9103fcc89b548 /arch/x86_64/src | |
| parent | 06b6e20ba921a062b71c86df8859eaaea4b75cb2 (diff) | |
| download | teachos-d4cc546df6eba2dd287785f1a63fbcce4a1b9bc0.tar.xz teachos-d4cc546df6eba2dd287785f1a63fbcce4a1b9bc0.zip | |
Attempt to move atomic into stl text as well
Diffstat (limited to 'arch/x86_64/src')
| -rw-r--r-- | arch/x86_64/src/user/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86_64/src/user/main.cpp b/arch/x86_64/src/user/main.cpp index 59647f8..a435a41 100644 --- a/arch/x86_64/src/user/main.cpp +++ b/arch/x86_64/src/user/main.cpp @@ -3,6 +3,9 @@ #include "arch/context_switching/syscall/main.hpp" #include "arch/memory/heap/global_heap_allocator.hpp" +#include <algorithm> +#include <atomic> + // TODO: Disallow these imports #include "arch/kernel/cpu/if.hpp" #include "arch/video/vga/text.hpp" @@ -17,6 +20,12 @@ namespace teachos::arch::user // kernel::cpu::clear_interrupt_flag(); // Causes crash Kernel Code (.text) is not mapped in User mMde + int test = std::max(5, 10); + (void)test; + + std::atomic<bool> locked = {false}; + locked.exchange(true); + auto address = memory::heap::global_heap_allocator::malloc(8U); (void)address; |
