Kernel: Make spinlocks more safe
Kernel now makes sure thread is not holding any spinlocks when it tries to lock a mutex or yield. Spinlocks are supposed to be only used for short times without the possibility of yielding
This commit is contained in:
@@ -337,6 +337,8 @@ namespace Kernel
|
||||
auto state = get_interrupt_state();
|
||||
set_interrupt_state(InterruptState::Disabled);
|
||||
|
||||
ASSERT(!Thread::current().has_spinlock());
|
||||
|
||||
auto& processor_info = s_processors[current_id().as_u32()];
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user