mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-12 05:05:26 +02:00
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:
@@ -3,7 +3,6 @@ using ChocolArm64.Memory;
|
||||
using ChocolArm64.State;
|
||||
using Ryujinx.Core.OsHle.Handles;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Kernel
|
||||
@@ -18,8 +17,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
||||
private Process Process;
|
||||
private AMemory Memory;
|
||||
|
||||
private ConcurrentDictionary<long, MutualExclusion> Mutexes;
|
||||
private ConcurrentDictionary<long, ConditionVariable> CondVars;
|
||||
private object CondVarLock;
|
||||
|
||||
private HashSet<(HSharedMem, long)> MappedSharedMems;
|
||||
|
||||
@@ -71,8 +69,7 @@ namespace Ryujinx.Core.OsHle.Kernel
|
||||
this.Process = Process;
|
||||
this.Memory = Process.Memory;
|
||||
|
||||
Mutexes = new ConcurrentDictionary<long, MutualExclusion>();
|
||||
CondVars = new ConcurrentDictionary<long, ConditionVariable>();
|
||||
CondVarLock = new object();
|
||||
|
||||
MappedSharedMems = new HashSet<(HSharedMem, long)>();
|
||||
}
|
||||
|
Reference in New Issue
Block a user