Kernel: Make RecursiveSpinLock thread safe

also SpinLock is now implemented with gcc builtins
This commit is contained in:
Bananymous
2023-05-29 19:38:09 +03:00
parent 998999a755
commit ff83f967d8
4 changed files with 35 additions and 39 deletions

View File

@@ -19,7 +19,7 @@ namespace Kernel
bool is_locked() const;
private:
int m_lock = 0;
volatile int m_lock = 0;
};
class RecursiveSpinLock
@@ -34,7 +34,7 @@ namespace Kernel
bool is_locked() const;
private:
pid_t m_locker = 0;
pid_t m_locker = -1;
uint32_t m_lock_depth = 0;
SpinLock m_lock;
};