mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
Scheduler: Remove some raw use of the runnable lists
This commit is contained in:
parent
3727a06c78
commit
d092855c72
Notes:
sideshowbarker
2024-07-19 13:08:50 +09:00
Author: https://github.com/rburchell Commit: https://github.com/SerenityOS/serenity/commit/d092855c729 Pull-request: https://github.com/SerenityOS/serenity/pull/343 Reviewed-by: https://github.com/awesomekling
@ -321,16 +321,18 @@ bool Scheduler::pick_next()
|
||||
|
||||
#ifdef SCHEDULER_RUNNABLE_DEBUG
|
||||
dbgprintf("Non-runnables:\n");
|
||||
for (auto* thread = g_nonrunnable_threads->head(); thread; thread = thread->next()) {
|
||||
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);
|
||||
}
|
||||
Thread::for_each_nonrunnable([](Thread& thread) -> IterationDecision {
|
||||
auto& process = thread.process();
|
||||
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");
|
||||
for (auto* thread = g_runnable_threads->head(); thread; thread = thread->next()) {
|
||||
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);
|
||||
}
|
||||
Thread::for_each_runnable([](Thread& thread) -> IterationDecision {
|
||||
auto& process = thread.process();
|
||||
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
|
||||
|
||||
if (g_runnable_threads->is_empty())
|
||||
|
Loading…
Reference in New Issue
Block a user