Kernel: Move Scheduler::yield() lock check after interrupts disabled
I have no idea why this solves a bug where current processor has scheduler lock at the beginning of yield.
This commit is contained in:
parent
b760892de2
commit
84b3289a2a
|
@ -133,11 +133,11 @@ namespace Kernel
|
|||
|
||||
void Scheduler::yield()
|
||||
{
|
||||
ASSERT(!m_lock.current_processor_has_lock());
|
||||
|
||||
auto state = Processor::get_interrupt_state();
|
||||
Processor::set_interrupt_state(InterruptState::Disabled);
|
||||
|
||||
ASSERT(!m_lock.current_processor_has_lock());
|
||||
|
||||
#if ARCH(x86_64)
|
||||
asm volatile(
|
||||
"movq %%rsp, %%rcx;"
|
||||
|
|
Loading…
Reference in New Issue