diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-20 03:44:45 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-20 03:47:02 +0200 |
commit | b3a1671f1a7bf667d3d51ded95757cbb455ceeb9 (patch) | |
tree | 5b78a3fca3eec9729312bb69ba8ec95f7eb84d22 /Kernel/Scheduler.cpp | |
parent | 0b850cf726fb7260acd296d45b22af98f19666db (diff) | |
download | serenity-b3a1671f1a7bf667d3d51ded95757cbb455ceeb9.zip |
Kernel: Add support for recv() with MSG_DONTWAIT.
Passing this flag to recv() temporarily puts the file descriptor into
non-blocking mode.
Also implement LocalSocket::recv() as a simple forwarding to read().
Diffstat (limited to 'Kernel/Scheduler.cpp')
-rw-r--r-- | Kernel/Scheduler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 4f6b55e048..98c357e6b1 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -223,10 +223,14 @@ bool Scheduler::pick_next() }); #ifdef SCHEDULER_DEBUG - dbgprintf("Scheduler choices: (runnable threads: %p)\n", g_runnable_threads); + 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); + } + + dbgprintf("Runnables:\n"); for (auto* thread = g_runnable_threads->head(); thread; thread = thread->next()) { - //if (process->state() == Thread::BlockedWait || process->state() == Thread::BlockedSleep) -// continue; 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); } |