1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

Scheduler: Remove some raw use of the runnable lists

This commit is contained in:
Robin Burchell 2019-07-19 12:18:40 +02:00 committed by Andreas Kling
parent 3727a06c78
commit d092855c72

View file

@ -321,16 +321,18 @@ bool Scheduler::pick_next()
#ifdef SCHEDULER_RUNNABLE_DEBUG #ifdef SCHEDULER_RUNNABLE_DEBUG
dbgprintf("Non-runnables:\n"); dbgprintf("Non-runnables:\n");
for (auto* thread = g_nonrunnable_threads->head(); thread; thread = thread->next()) { Thread::for_each_nonrunnable([](Thread& thread) -> IterationDecision {
auto* process = &thread->process(); auto& process = thread.process();
dbgprintf("[K%x] %-12s %s(%u:%u) @ %w:%x\n", process, to_string(thread->state()), process->name().characters(), process->pid(), thread->tid(), thread->tss().cs, thread->tss().eip); dbgprintf("[K%x] %-12s %s(%u:%u) @ %w:%x\n", &process, thread.state_string(), process.name().characters(), process.pid(), thread.tid(), thread.tss().cs, thread.tss().eip);
} return IterationDecision::Continue;
});
dbgprintf("Runnables:\n"); dbgprintf("Runnables:\n");
for (auto* thread = g_runnable_threads->head(); thread; thread = thread->next()) { Thread::for_each_runnable([](Thread& thread) -> IterationDecision {
auto* process = &thread->process(); auto& process = thread.process();
dbgprintf("[K%x] %-12s %s(%u:%u) @ %w:%x\n", process, to_string(thread->state()), process->name().characters(), process->pid(), thread->tid(), thread->tss().cs, thread->tss().eip); dbgprintf("[K%x] %-12s %s(%u:%u) @ %w:%x\n", &process, thread.state_string(), process.name().characters(), process.pid(), thread.tid(), thread.tss().cs, thread.tss().eip);
} return IterationDecision::Continue;
});
#endif #endif
if (g_runnable_threads->is_empty()) if (g_runnable_threads->is_empty())