Implement the synchronization primitives like the Horizon kernel does (#97)
* Started to work in improving the sync primitives * Some fixes * Check that the mutex address matches before waking a waiting thread * Add MutexOwner field to keep track of the thread owning the mutex, update wait list when priority changes, other tweaks * Add new priority information to the log * SvcSetThreadPriority should update just the WantedPriority
This commit is contained in:
@@ -91,7 +91,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
||||
if (CurrThread != null)
|
||||
{
|
||||
ThreadState.X0 = 0;
|
||||
ThreadState.X1 = (ulong)CurrThread.Priority;
|
||||
ThreadState.X1 = (ulong)CurrThread.ActualPriority;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -110,7 +110,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
||||
|
||||
if (CurrThread != null)
|
||||
{
|
||||
CurrThread.Priority = Priority;
|
||||
CurrThread.SetPriority(Priority);
|
||||
|
||||
ThreadState.X0 = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user