misc: Make PID unsigned long instead of long (#3043)

This commit is contained in:
Mary 2022-02-09 21:18:07 +01:00 committed by GitHub
parent 86b37d0ff7
commit 6dffe0fad4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 99 additions and 100 deletions

View file

@ -62,7 +62,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
public ulong TitleId { get; private set; }
public bool IsApplication { get; private set; }
public long Pid { get; private set; }
public ulong Pid { get; private set; }
private long _creationTimestamp;
private ulong _entrypoint;
@ -131,7 +131,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
Pid = KernelContext.NewKipId();
if (Pid == 0 || (ulong)Pid >= KernelConstants.InitialProcessId)
if (Pid == 0 || Pid >= KernelConstants.InitialProcessId)
{
throw new InvalidOperationException($"Invalid KIP Id {Pid}.");
}
@ -239,7 +239,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
Pid = KernelContext.NewProcessId();
if (Pid == -1 || (ulong)Pid < KernelConstants.InitialProcessId)
if (Pid == ulong.MaxValue || Pid < KernelConstants.InitialProcessId)
{
throw new InvalidOperationException($"Invalid Process Id {Pid}.");
}