aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-05-04 00:41:29 -0300
committerGitHub <noreply@github.com>2020-05-04 13:41:29 +1000
commit15d1cc806b1b978bab83d8bb426a124d9f0f788c (patch)
tree4fd10fdd11412bafcf3022e7cc4eb21179eef1b1 /Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs
parentcd48576f5846aa89a36bfc833e9de5dde9627aed (diff)
Move kernel state out of the Horizon class (#1107)
* Move kernel state from Horizon to KernelContext * Merge syscalls partial classes, split 32 and 64-bit variants * Sort usings
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs')
-rw-r--r--Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs b/Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs
index 3b30dd80..812cbd30 100644
--- a/Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs
+++ b/Ryujinx.HLE/HOS/Kernel/Common/KAutoObject.cs
@@ -4,20 +4,20 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
{
class KAutoObject
{
- protected Horizon System;
+ protected KernelContext KernelContext;
private int _referenceCount;
- public KAutoObject(Horizon system)
+ public KAutoObject(KernelContext context)
{
- System = system;
+ KernelContext = context;
_referenceCount = 1;
}
public virtual KernelResult SetName(string name)
{
- if (!System.AutoObjectNames.TryAdd(name, this))
+ if (!KernelContext.AutoObjectNames.TryAdd(name, this))
{
return KernelResult.InvalidState;
}
@@ -25,9 +25,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
return KernelResult.Success;
}
- public static KernelResult RemoveName(Horizon system, string name)
+ public static KernelResult RemoveName(KernelContext context, string name)
{
- if (!system.AutoObjectNames.TryRemove(name, out _))
+ if (!context.AutoObjectNames.TryRemove(name, out _))
{
return KernelResult.NotFound;
}
@@ -35,9 +35,9 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
return KernelResult.Success;
}
- public static KAutoObject FindNamedObject(Horizon system, string name)
+ public static KAutoObject FindNamedObject(KernelContext context, string name)
{
- if (system.AutoObjectNames.TryGetValue(name, out KAutoObject obj))
+ if (context.AutoObjectNames.TryGetValue(name, out KAutoObject obj))
{
return obj;
}