Fix ~3500 analyser issues

See merge request ryubing/ryujinx!44
This commit is contained in:
MrKev 2025-05-30 17:08:34 -05:00 committed by LotP
parent 417df486b1
commit 361d0c5632
622 changed files with 3080 additions and 2652 deletions

View file

@ -6,7 +6,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
{
private readonly KernelContext _context;
private int _recursionCount;
// type is not Lock due to Monitor class usage
public object Lock { get; } = new();

View file

@ -46,10 +46,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
_currentThread = null;
if (_srcCoresHighestPrioThreads == null)
{
_srcCoresHighestPrioThreads = new int[CpuCoresCount];
}
_srcCoresHighestPrioThreads ??= new int[CpuCoresCount];
}
private static int PreemptionPriorities(int index)

View file

@ -537,7 +537,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
ThreadSchedState lowNibble = SchedFlags & ThreadSchedState.LowMask;
if (lowNibble != ThreadSchedState.Paused && lowNibble != ThreadSchedState.Running)
if (lowNibble is not ThreadSchedState.Paused and not ThreadSchedState.Running)
{
KernelContext.CriticalSection.Leave();