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

@ -42,14 +42,14 @@ namespace Ryujinx.HLE.HOS.Kernel
public KSynchronization Synchronization { get; }
public KContextIdManager ContextIdManager { get; }
public ConcurrentDictionary<long, KProcess> Processes { get; }
public ConcurrentDictionary<ulong, KProcess> Processes { get; }
public ConcurrentDictionary<string, KAutoObject> AutoObjectNames { get; }
public bool ThreadReselectionRequested { get; set; }
private long _kipId;
private long _processId;
private long _threadUid;
private ulong _kipId;
private ulong _processId;
private ulong _threadUid;
public KernelContext(
Switch device,
@ -98,7 +98,7 @@ namespace Ryujinx.HLE.HOS.Kernel
KernelInitialized = true;
Processes = new ConcurrentDictionary<long, KProcess>();
Processes = new ConcurrentDictionary<ulong, KProcess>();
AutoObjectNames = new ConcurrentDictionary<string, KAutoObject>();
_kipId = KernelConstants.InitialKipId;
@ -115,17 +115,17 @@ namespace Ryujinx.HLE.HOS.Kernel
new Thread(PreemptionThreadStart) { Name = "HLE.PreemptionThread" }.Start();
}
public long NewThreadUid()
public ulong NewThreadUid()
{
return Interlocked.Increment(ref _threadUid) - 1;
}
public long NewKipId()
public ulong NewKipId()
{
return Interlocked.Increment(ref _kipId) - 1;
}
public long NewProcessId()
public ulong NewProcessId()
{
return Interlocked.Increment(ref _processId) - 1;
}