From 5d78cd3016fc7d4d29b957749962075f2150a5ec Mon Sep 17 00:00:00 2001 From: Bananymous Date: Fri, 9 Feb 2024 16:58:55 +0200 Subject: [PATCH] Kernel: Add spin lock assert back. I had accidentally deleted it --- kernel/kernel/SpinLock.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/kernel/SpinLock.cpp b/kernel/kernel/SpinLock.cpp index d4e1db7520..6a56a46fa2 100644 --- a/kernel/kernel/SpinLock.cpp +++ b/kernel/kernel/SpinLock.cpp @@ -7,6 +7,7 @@ namespace Kernel void SpinLock::lock() { pid_t tid = Scheduler::current_tid(); + ASSERT(tid != m_locker); while (!m_locker.compare_exchange(-1, tid)) Scheduler::get().reschedule(); }