diff --git a/Kernel/Lock.h b/Kernel/Lock.h index b3d589e139..5d27ff936f 100644 --- a/Kernel/Lock.h +++ b/Kernel/Lock.h @@ -72,7 +72,7 @@ private: // the lock is unlocked, it just means we don't know which threads hold it. // When locked exclusively, this is always the one thread that holds the // lock. - Thread* m_holder { nullptr }; + RefPtr m_holder; }; class Locker { diff --git a/Kernel/Scheduler.cpp b/Kernel/Scheduler.cpp index 27cf61dd51..20ef1e6810 100644 --- a/Kernel/Scheduler.cpp +++ b/Kernel/Scheduler.cpp @@ -311,7 +311,7 @@ bool Scheduler::donate_to(RefPtr& beneficiary, const char* reason) ASSERT(!proc.in_irq()); if (proc.in_critical() > 1) { - scheduler_data.m_pending_beneficiary = *beneficiary; // Save the beneficiary + scheduler_data.m_pending_beneficiary = beneficiary; // Save the beneficiary scheduler_data.m_pending_donate_reason = reason; proc.invoke_scheduler_async(); return false;