diff options
author | gdkchan <gab.dark.100@gmail.com> | 2020-05-04 00:41:29 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 13:41:29 +1000 |
commit | 15d1cc806b1b978bab83d8bb426a124d9f0f788c (patch) | |
tree | 4fd10fdd11412bafcf3022e7cc4eb21179eef1b1 /Ryujinx.HLE/HOS/Kernel/Threading/KReadableEvent.cs | |
parent | cd48576f5846aa89a36bfc833e9de5dde9627aed (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/Threading/KReadableEvent.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/Threading/KReadableEvent.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/Threading/KReadableEvent.cs b/Ryujinx.HLE/HOS/Kernel/Threading/KReadableEvent.cs index 9821de35..d378b81e 100644 --- a/Ryujinx.HLE/HOS/Kernel/Threading/KReadableEvent.cs +++ b/Ryujinx.HLE/HOS/Kernel/Threading/KReadableEvent.cs @@ -4,18 +4,18 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading { class KReadableEvent : KSynchronizationObject { - private KEvent _parent; + private readonly KEvent _parent; private bool _signaled; - public KReadableEvent(Horizon system, KEvent parent) : base(system) + public KReadableEvent(KernelContext context, KEvent parent) : base(context) { _parent = parent; } public override void Signal() { - System.CriticalSection.Enter(); + KernelContext.CriticalSection.Enter(); if (!_signaled) { @@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading base.Signal(); } - System.CriticalSection.Leave(); + KernelContext.CriticalSection.Leave(); } public KernelResult Clear() @@ -38,7 +38,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading { KernelResult result; - System.CriticalSection.Enter(); + KernelContext.CriticalSection.Enter(); if (_signaled) { @@ -51,7 +51,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading result = KernelResult.InvalidState; } - System.CriticalSection.Leave(); + KernelContext.CriticalSection.Leave(); return result; } |