Kernel: Thread is no longer RefCounted

This makes developement with Scheduler much easier against compiler
optimizations. I could now remove the pragma GCC optimize stuff.
This commit is contained in:
2023-03-30 19:13:28 +03:00
parent c2e3b422cc
commit dcee92a6bc
7 changed files with 41 additions and 44 deletions

View File

@@ -25,7 +25,7 @@ namespace Kernel
void RecursiveSpinLock::lock()
{
// FIXME: is this thread safe?
if (m_locker == Thread::current()->tid())
if (m_locker == Thread::current().tid())
{
m_lock_depth++;
}
@@ -33,7 +33,7 @@ namespace Kernel
{
m_lock.lock();
ASSERT(m_locker == 0);
m_locker = Thread::current()->tid();
m_locker = Thread::current().tid();
m_lock_depth = 1;
}
}