1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:38:11 +00:00

Kernel: Require a reason to be passed to Thread::wait_on

The Lock class still permits no reason, but for everything else
require a reason to be passed to Thread::wait_on. This makes it
easier to diagnose why a Thread is in Queued state.
This commit is contained in:
Tom 2020-07-04 15:55:20 -06:00 committed by Andreas Kling
parent 0c4b0c0312
commit 788b2d64c6
11 changed files with 19 additions and 11 deletions

View file

@ -4846,7 +4846,7 @@ int Process::sys$futex(const Syscall::SC_futex_params* user_params)
}
// FIXME: This is supposed to be interruptible by a signal, but right now WaitQueue cannot be interrupted.
Thread::BlockResult result = Thread::current()->wait_on(wait_queue, optional_timeout);
Thread::BlockResult result = Thread::current()->wait_on(wait_queue, "Futex", optional_timeout);
if (result == Thread::BlockResult::InterruptedByTimeout) {
return -ETIMEDOUT;
}