mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 01:15:07 +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:
parent
0c4b0c0312
commit
788b2d64c6
11 changed files with 19 additions and 11 deletions
|
@ -34,7 +34,7 @@ void FinalizerTask::spawn()
|
|||
Process::create_kernel_process(g_finalizer, "FinalizerTask", [] {
|
||||
Thread::current()->set_priority(THREAD_PRIORITY_LOW);
|
||||
for (;;) {
|
||||
Thread::current()->wait_on(*g_finalizer_wait_queue);
|
||||
Thread::current()->wait_on(*g_finalizer_wait_queue, "FinalizerTask");
|
||||
|
||||
bool expected = true;
|
||||
if (g_finalizer_has_work.compare_exchange_strong(expected, false, AK::MemoryOrder::memory_order_acq_rel))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue