diff --git a/kernel/include/assert.h b/kernel/include/assert.h index ca9fb709..9e0da36b 100644 --- a/kernel/include/assert.h +++ b/kernel/include/assert.h @@ -1,6 +1,6 @@ #pragma once #include "log/Log.h" -#include "panic/hang.h" +#include "misc/hang.h" #define __call_assert_fail(...) \ kerrorln(__VA_ARGS__); \ diff --git a/kernel/include/panic/hang.h b/kernel/include/misc/hang.h similarity index 100% rename from kernel/include/panic/hang.h rename to kernel/include/misc/hang.h diff --git a/kernel/include/power/reboot.h b/kernel/include/misc/reboot.h similarity index 100% rename from kernel/include/power/reboot.h rename to kernel/include/misc/reboot.h diff --git a/kernel/include/power/shutdown.h b/kernel/include/misc/shutdown.h similarity index 100% rename from kernel/include/power/shutdown.h rename to kernel/include/misc/shutdown.h diff --git a/kernel/include/scheduling/PIT.h b/kernel/include/thread/PIT.h similarity index 100% rename from kernel/include/scheduling/PIT.h rename to kernel/include/thread/PIT.h diff --git a/kernel/src/init/Init.cpp b/kernel/src/init/Init.cpp index 9bf2c45c..ab012c1f 100644 --- a/kernel/src/init/Init.cpp +++ b/kernel/src/init/Init.cpp @@ -8,7 +8,7 @@ #include "log/Log.h" #include "memory/RangeAllocator.h" #include "memory/VMM.h" -#include "panic/hang.h" +#include "misc/hang.h" #include "rand/Init.h" #include "rand/Mersenne.h" #include "render/Framebuffer.h" diff --git a/kernel/src/interrupts/Entry.cpp b/kernel/src/interrupts/Entry.cpp index be8b9cbb..db9ec02c 100644 --- a/kernel/src/interrupts/Entry.cpp +++ b/kernel/src/interrupts/Entry.cpp @@ -5,7 +5,7 @@ #include "interrupts/IRQ.h" #include "interrupts/Interrupts.h" #include "log/Log.h" -#include "panic/hang.h" +#include "misc/hang.h" #include "std/stdio.h" #include "thread/Scheduler.h" #include "trace/StackTracer.h" diff --git a/kernel/src/interrupts/IRQ.cpp b/kernel/src/interrupts/IRQ.cpp index 6376fed8..e1771c51 100644 --- a/kernel/src/interrupts/IRQ.cpp +++ b/kernel/src/interrupts/IRQ.cpp @@ -4,10 +4,10 @@ #include "io/IO.h" #include "io/PIC.h" #include "log/Log.h" -#include "power/reboot.h" +#include "misc/reboot.h" #include "rand/Init.h" -#include "scheduling/PIT.h" #include "std/stdio.h" +#include "thread/PIT.h" #include "thread/Scheduler.h" void IRQ::interrupt_handler(Context* context) diff --git a/kernel/src/log/Log.cpp b/kernel/src/log/Log.cpp index eff893c4..bd0d7ab4 100644 --- a/kernel/src/log/Log.cpp +++ b/kernel/src/log/Log.cpp @@ -1,7 +1,7 @@ #include "log/Log.h" #include "io/Serial.h" -#include "scheduling/PIT.h" #include "std/stdio.h" +#include "thread/PIT.h" #include static int level_mask = 15; diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index 53f1ed7c..cbe860df 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -17,15 +17,14 @@ #include "memory/Memory.h" #include "memory/MemoryMap.h" #include "memory/RangeAllocator.h" -#include "panic/hang.h" -#include "power/reboot.h" +#include "misc/reboot.h" #include "rand/Mersenne.h" #include "render/Framebuffer.h" #include "render/TextRenderer.h" -#include "scheduling/PIT.h" #include "std/stdio.h" #include "std/stdlib.h" #include "std/string.h" +#include "thread/PIT.h" #include "thread/Scheduler.h" extern "C" void _start() diff --git a/kernel/src/config.cpp b/kernel/src/misc/config.cpp similarity index 100% rename from kernel/src/config.cpp rename to kernel/src/misc/config.cpp diff --git a/kernel/src/psf1.cpp b/kernel/src/misc/psf1.cpp similarity index 100% rename from kernel/src/psf1.cpp rename to kernel/src/misc/psf1.cpp diff --git a/kernel/src/stack.cpp b/kernel/src/misc/stack.cpp similarity index 100% rename from kernel/src/stack.cpp rename to kernel/src/misc/stack.cpp diff --git a/kernel/src/panic/hang.cpp b/kernel/src/panic/hang.cpp index bca5a27a..e655f0c5 100644 --- a/kernel/src/panic/hang.cpp +++ b/kernel/src/panic/hang.cpp @@ -1,4 +1,4 @@ -#include "panic/hang.h" +#include "misc/hang.h" [[noreturn]] void hang() { diff --git a/kernel/src/power/reboot.cpp b/kernel/src/power/reboot.cpp index 0bb914af..08742f29 100644 --- a/kernel/src/power/reboot.cpp +++ b/kernel/src/power/reboot.cpp @@ -1,6 +1,6 @@ #define MODULE "power" -#include "power/reboot.h" +#include "misc/reboot.h" #include "acpi/FADT.h" #include "acpi/RSDT.h" #include "assert.h" @@ -8,7 +8,7 @@ #include "interrupts/Interrupts.h" #include "io/IO.h" #include "log/Log.h" -#include "panic/hang.h" +#include "misc/hang.h" #include "std/string.h" static void try_acpi_reboot() diff --git a/kernel/src/power/shutdown.cpp b/kernel/src/power/shutdown.cpp index 5921268b..3087ab1a 100644 --- a/kernel/src/power/shutdown.cpp +++ b/kernel/src/power/shutdown.cpp @@ -1,10 +1,10 @@ #define MODULE "power" -#include "power/shutdown.h" +#include "misc/shutdown.h" #include "interrupts/Interrupts.h" #include "io/IO.h" #include "log/Log.h" -#include "panic/hang.h" +#include "misc/hang.h" [[noreturn]] void shutdown() { diff --git a/kernel/src/std/stdlib.cpp b/kernel/src/std/stdlib.cpp index af014abb..44494d9f 100644 --- a/kernel/src/std/stdlib.cpp +++ b/kernel/src/std/stdlib.cpp @@ -1,6 +1,5 @@ -#include "panic/hang.h" +#include "std/stdlib.h" #include "thread/Scheduler.h" -#include static void strrev(char* arr, int start, int end) { diff --git a/kernel/src/scheduling/PIT.cpp b/kernel/src/thread/PIT.cpp similarity index 95% rename from kernel/src/scheduling/PIT.cpp rename to kernel/src/thread/PIT.cpp index 2fcb18f1..8f3da946 100644 --- a/kernel/src/scheduling/PIT.cpp +++ b/kernel/src/thread/PIT.cpp @@ -1,6 +1,6 @@ #define MODULE "pit" -#include "scheduling/PIT.h" +#include "thread/PIT.h" #include "io/IO.h" #include "log/Log.h" diff --git a/kernel/src/thread/Scheduler.cpp b/kernel/src/thread/Scheduler.cpp index 51fd7b68..f61b3bdf 100644 --- a/kernel/src/thread/Scheduler.cpp +++ b/kernel/src/thread/Scheduler.cpp @@ -5,9 +5,9 @@ #include "interrupts/Interrupts.h" #include "log/Log.h" #include "memory/KernelMemoryManager.h" -#include "panic/hang.h" -#include "scheduling/PIT.h" +#include "misc/hang.h" #include "std/string.h" +#include "thread/PIT.h" #include "thread/Task.h" static Task tasks[32];