mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 11:06:24 +02:00
parent
417df486b1
commit
361d0c5632
622 changed files with 3080 additions and 2652 deletions
|
@ -128,7 +128,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
|
||||
Pid = KernelContext.NewKipId();
|
||||
|
||||
if (Pid == 0 || Pid >= KernelConstants.InitialProcessId)
|
||||
if (Pid is 0 or >= KernelConstants.InitialProcessId)
|
||||
{
|
||||
throw new InvalidOperationException($"Invalid KIP Id {Pid}.");
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
|
||||
Pid = KernelContext.NewProcessId();
|
||||
|
||||
if (Pid == ulong.MaxValue || Pid < KernelConstants.InitialProcessId)
|
||||
if (Pid is ulong.MaxValue or < KernelConstants.InitialProcessId)
|
||||
{
|
||||
throw new InvalidOperationException($"Invalid Process Id {Pid}.");
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
return KernelResult.InvalidCombination;
|
||||
}
|
||||
|
||||
if (requiredKernelVersionMajor != KernelVersionMajor && requiredKernelVersionMajor < 3)
|
||||
if (requiredKernelVersionMajor is not KernelVersionMajor and < 3)
|
||||
{
|
||||
return KernelResult.InvalidCombination;
|
||||
}
|
||||
|
@ -461,7 +461,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
|
||||
Result result = Result.Success;
|
||||
|
||||
|
||||
if (_fullTlsPages.TryGetValue(tlsPageAddr, out KTlsPageInfo pageInfo))
|
||||
{
|
||||
// TLS page was full, free slot and move to free pages tree.
|
||||
|
@ -509,7 +508,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
return result;
|
||||
}
|
||||
|
||||
private void GenerateRandomEntropy()
|
||||
private static void GenerateRandomEntropy()
|
||||
{
|
||||
// TODO.
|
||||
}
|
||||
|
@ -882,10 +881,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
{
|
||||
if (State >= ProcessState.Started)
|
||||
{
|
||||
if (State == ProcessState.Started ||
|
||||
State == ProcessState.Crashed ||
|
||||
State == ProcessState.Attached ||
|
||||
State == ProcessState.DebugSuspended)
|
||||
if (State is ProcessState.Started or
|
||||
ProcessState.Crashed or
|
||||
ProcessState.Attached or
|
||||
ProcessState.DebugSuspended)
|
||||
{
|
||||
SetState(ProcessState.Exiting);
|
||||
|
||||
|
@ -925,9 +924,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
{
|
||||
if (State >= ProcessState.Started)
|
||||
{
|
||||
if (State == ProcessState.Started ||
|
||||
State == ProcessState.Attached ||
|
||||
State == ProcessState.DebugSuspended)
|
||||
if (State is ProcessState.Started or
|
||||
ProcessState.Attached or
|
||||
ProcessState.DebugSuspended)
|
||||
{
|
||||
SetState(ProcessState.Exiting);
|
||||
|
||||
|
@ -1090,7 +1089,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
|||
{
|
||||
KernelContext.CriticalSection.Enter();
|
||||
|
||||
if (State != ProcessState.Exiting && State != ProcessState.Exited)
|
||||
if (State is not ProcessState.Exiting and not ProcessState.Exited)
|
||||
{
|
||||
if (pause)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue