Kernel: Don't block thread if the wake time has already passed

This commit is contained in:
2026-07-14 05:42:31 +03:00
parent 2e8239fefa
commit a9cf0134b7

View File

@@ -667,6 +667,9 @@ namespace Kernel
void Scheduler::block_current_thread(ThreadBlocker* blocker, uint64_t wake_time_ns, BaseMutex* mutex)
{
if (SystemTimer::get().ns_since_boot() >= wake_time_ns)
return;
auto state = Processor::get_interrupt_state();
Processor::set_interrupt_state(InterruptState::Disabled);