mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-13 16:55:47 +00:00
@@ -138,6 +138,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
{
|
||||
sb.AppendLine($"\tX[{i:d2}]:\t{GetReg(i)}");
|
||||
}
|
||||
|
||||
sb.AppendLine($"\tFP:\t{GetReg(29)}");
|
||||
sb.AppendLine($"\tLR:\t{GetReg(30)}");
|
||||
sb.AppendLine($"\tSP:\t{GetReg(31)}");
|
||||
@@ -235,6 +236,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
{
|
||||
info.SubName = Demangler.Parse(info.SubName);
|
||||
}
|
||||
|
||||
info.SubOffset = info.Offset - symbol.Value;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Diagnostics.CodeAnalysis;
|
||||
namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
{
|
||||
[Flags]
|
||||
[SuppressMessage("Design", "CA1069: Enums values should not be duplicated")]
|
||||
enum ProcessCreationFlags
|
||||
{
|
||||
Is64Bit = 1 << 0,
|
||||
|
||||
Reference in New Issue
Block a user