diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs b/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs index a7955d7a..91501a98 100644 --- a/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs +++ b/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs @@ -8,17 +8,17 @@ namespace Ryujinx.HLE.HOS.Kernel.Common { private const int Time10SecondsMs = 10000; - private long[] _current; - private long[] _limit; - private long[] _available; + private readonly long[] _current; + private readonly long[] _limit; + private readonly long[] _available; - private object _lockObj; + private readonly object _lockObj; - private LinkedList<KThread> _waitingThreads; + private readonly LinkedList<KThread> _waitingThreads; private int _waitingThreadsCount; - public KResourceLimit(Horizon system) : base(system) + public KResourceLimit(KernelContext context) : base(context) { _current = new long[(int)LimitableResource.Count]; _limit = new long[(int)LimitableResource.Count]; @@ -57,7 +57,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common { _waitingThreadsCount++; - KConditionVariable.Wait(System, _waitingThreads, _lockObj, timeout); + KConditionVariable.Wait(KernelContext, _waitingThreads, _lockObj, timeout); _waitingThreadsCount--; @@ -101,7 +101,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common if (_waitingThreadsCount > 0) { - KConditionVariable.NotifyAll(System, _waitingThreads); + KConditionVariable.NotifyAll(KernelContext, _waitingThreads); } } } |