Kernel: Implement basic SpinLock

This commit is contained in:
2023-02-01 01:51:25 +02:00
parent 1945b716ad
commit 337569b0ca
8 changed files with 109 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
#include <kernel/SpinLock.h>
namespace Kernel
{
extern "C" void spinlock_lock_asm(int*);
extern "C" void spinlock_unlock_asm(int*);
void SpinLock::lock()
{
spinlock_lock_asm(&m_lock);
}
void SpinLock::unlock()
{
spinlock_unlock_asm(&m_lock);
}
}