mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 12:47:11 +02:00
Migrate to .NET 9 (#198)
This commit is contained in:
parent
8db5a7e98b
commit
ff6628149d
136 changed files with 278 additions and 270 deletions
|
@ -2,6 +2,7 @@ using Ryujinx.Common;
|
|||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||
using Ryujinx.Horizon.Common;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.Common
|
||||
{
|
||||
|
@ -14,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||
private readonly long[] _current2;
|
||||
private readonly long[] _peak;
|
||||
|
||||
private readonly object _lock;
|
||||
private readonly object _lock = new();
|
||||
|
||||
private readonly LinkedList<KThread> _waitingThreads;
|
||||
|
||||
|
@ -27,8 +28,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||
_current2 = new long[(int)LimitableResource.Count];
|
||||
_peak = new long[(int)LimitableResource.Count];
|
||||
|
||||
_lock = new object();
|
||||
|
||||
_waitingThreads = new LinkedList<KThread>();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using Ryujinx.HLE.HOS.Kernel.Process;
|
|||
using Ryujinx.Horizon.Common;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Kernel.Memory
|
||||
{
|
||||
|
@ -11,7 +12,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
{
|
||||
public KProcess Owner { get; private set; }
|
||||
private readonly KPageList _pageList;
|
||||
private readonly object _lock;
|
||||
private readonly Lock _lock = new();
|
||||
private ulong _address;
|
||||
private bool _isOwnerMapped;
|
||||
private bool _isMapped;
|
||||
|
@ -19,7 +20,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
public KCodeMemory(KernelContext context) : base(context)
|
||||
{
|
||||
_pageList = new KPageList();
|
||||
_lock = new object();
|
||||
}
|
||||
|
||||
public Result Initialize(ulong address, ulong size)
|
||||
|
|
|
@ -40,8 +40,8 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
|
||||
public ProcessState State { get; private set; }
|
||||
|
||||
private readonly object _processLock = new();
|
||||
private readonly object _threadingLock = new();
|
||||
private readonly Lock _processLock = new();
|
||||
private readonly Lock _threadingLock = new();
|
||||
|
||||
public KAddressArbiter AddressArbiter { get; private set; }
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
|
||||
WakeThreads(_condVarThreads, count, TryAcquireMutex, x => x.CondVarAddress == address);
|
||||
|
||||
if (!_condVarThreads.Exists(x => x.CondVarAddress == address))
|
||||
if (!_condVarThreads.Any(x => x.CondVarAddress == address))
|
||||
{
|
||||
KernelTransfer.KernelToUser(address, 0);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
class KCriticalSection
|
||||
{
|
||||
private readonly KernelContext _context;
|
||||
private readonly object _lock;
|
||||
private readonly object _lock = new();
|
||||
private int _recursionCount;
|
||||
|
||||
public object Lock => _lock;
|
||||
|
@ -13,7 +13,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
public KCriticalSection(KernelContext context)
|
||||
{
|
||||
_context = context;
|
||||
_lock = new object();
|
||||
}
|
||||
|
||||
public void Enter()
|
||||
|
|
|
@ -112,7 +112,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
|
||||
public bool WaitingInArbitration { get; set; }
|
||||
|
||||
private readonly object _activityOperationLock = new();
|
||||
private readonly Lock _activityOperationLock = new();
|
||||
|
||||
public KThread(KernelContext context) : base(context)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue