mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-26 09:35:46 +00:00
Kernel: Turn Thread::current and Process::current into functions
This allows us to query the current thread and process on a per processor basis
This commit is contained in:
@@ -32,10 +32,10 @@ namespace Kernel {
|
||||
void FinalizerTask::spawn()
|
||||
{
|
||||
Process::create_kernel_process(g_finalizer, "FinalizerTask", [] {
|
||||
Thread::current->set_priority(THREAD_PRIORITY_LOW);
|
||||
Thread::current()->set_priority(THREAD_PRIORITY_LOW);
|
||||
for (;;) {
|
||||
dbg() << "Finalizer task is running";
|
||||
Thread::current->wait_on(*g_finalizer_wait_queue);
|
||||
Thread::current()->wait_on(*g_finalizer_wait_queue);
|
||||
|
||||
bool expected = true;
|
||||
if (g_finalizer_has_work.compare_exchange_strong(expected, false, AK::MemoryOrder::memory_order_acq_rel))
|
||||
|
||||
Reference in New Issue
Block a user