From 6d6807d5ac7805cd01b9c6c1b4971e51fbdc7a26 Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Wed, 13 Nov 2024 13:52:38 -0300 Subject: [PATCH] fix CS9216 --- src/Ryujinx.Audio/Input/AudioInputSystem.cs | 4 ++-- src/Ryujinx.Audio/Output/AudioOutputSystem.cs | 4 ++-- src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs | 2 +- src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs | 2 +- .../HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Audio/Input/AudioInputSystem.cs b/src/Ryujinx.Audio/Input/AudioInputSystem.cs index 34623b34fd..65b99745d7 100644 --- a/src/Ryujinx.Audio/Input/AudioInputSystem.cs +++ b/src/Ryujinx.Audio/Input/AudioInputSystem.cs @@ -48,7 +48,7 @@ public class AudioInputSystem : IDisposable /// /// The lock of the parent. /// - private readonly object _parentLock; + private readonly Lock _parentLock; /// /// The dispose state. @@ -62,7 +62,7 @@ public class AudioInputSystem : IDisposable /// The lock of the manager /// The hardware device session /// The buffer release event of the audio input - public AudioInputSystem(AudioInputManager manager, object parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) + public AudioInputSystem(AudioInputManager manager, Lock parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) { _manager = manager; _parentLock = parentLock; diff --git a/src/Ryujinx.Audio/Output/AudioOutputSystem.cs b/src/Ryujinx.Audio/Output/AudioOutputSystem.cs index f9b9bdcf1d..dc7d52cedf 100644 --- a/src/Ryujinx.Audio/Output/AudioOutputSystem.cs +++ b/src/Ryujinx.Audio/Output/AudioOutputSystem.cs @@ -48,7 +48,7 @@ public class AudioOutputSystem : IDisposable /// /// THe lock of the parent. /// - private readonly object _parentLock; + private readonly Lock _parentLock; /// /// The dispose state. @@ -62,7 +62,7 @@ public class AudioOutputSystem : IDisposable /// The lock of the manager /// The hardware device session /// The buffer release event of the audio output - public AudioOutputSystem(AudioOutputManager manager, object parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) + public AudioOutputSystem(AudioOutputManager manager, Lock parentLock, IHardwareDeviceSession deviceSession, IWritableEvent bufferEvent) { _manager = manager; _parentLock = parentLock; diff --git a/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs b/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs index ce2b7185a7..90231b4606 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Common/KResourceLimit.cs @@ -15,7 +15,7 @@ class KResourceLimit : KAutoObject private readonly long[] _current2; private readonly long[] _peak; - private readonly Lock _lock = new(); + private readonly object _lock = new(); private readonly LinkedList _waitingThreads; diff --git a/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs b/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs index 5a7b9cbaf1..bfa6b68f66 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Threading/KCriticalSection.cs @@ -5,7 +5,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading class KCriticalSection { private readonly KernelContext _context; - private readonly Lock _lock = new(); + private readonly object _lock = new(); private int _recursionCount; public object Lock => _lock; diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs index 63a8e8c979..5b9e6811d3 100644 --- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs +++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs @@ -10,7 +10,7 @@ class EventFileDescriptor : IFileDescriptor private ulong _value; private readonly EventFdFlags _flags; - private readonly Lock _lock = new(); + private readonly object _lock = new(); public bool Blocking { get => !_flags.HasFlag(EventFdFlags.NonBlocking); set => throw new NotSupportedException(); }