forked from Bananymous/banan-os
Kernel: Make spinlocks more safe
Kernel now makes sure thread is not holding any spinlocks when it tries to lock a mutex or yield. Spinlocks are supposed to be only used for short times without the possibility of yielding
This commit is contained in:
@@ -140,6 +140,8 @@ namespace Kernel
|
||||
|
||||
pid_t Thread::current_tid()
|
||||
{
|
||||
if (Processor::count() == 0)
|
||||
return 0;
|
||||
return Processor::scheduler().current_tid();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user