Kernel: Rewrite all kernel mutexes

Now SpinLock is actually just a spin lock and I added a Mutex that
does the same as the old "SpinLock". This is in preparation for
starting to support smp and making the kernel smp safe. This commit
also removes obsolete PageTableScope and CriticalScope which should
now be used by alternative APIs.
This commit is contained in:
2024-02-25 21:29:43 +02:00
parent 6ebfe05fce
commit 40b626b0aa
83 changed files with 825 additions and 703 deletions

View File

@@ -1,7 +1,7 @@
#include <kernel/Arch.h>
#include <kernel/CPUID.h>
#include <kernel/InterruptController.h>
#include <kernel/LockGuard.h>
#include <kernel/Lock/LockGuard.h>
#include <kernel/Memory/kmalloc.h>
#include <kernel/Memory/PageTable.h>
@@ -22,6 +22,8 @@ namespace Kernel
static bool s_has_nxe = false;
static bool s_has_pge = false;
SpinLock PageTable::s_fast_page_lock;
// PML4 entry for kernel memory
static paddr_t s_global_pml4e = 0;