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(); }