aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Sockets
diff options
context:
space:
mode:
authorMarco Carvalho <marcolucio27@gmail.com>2023-06-14 21:34:55 -0300
committerGitHub <noreply@github.com>2023-06-15 00:34:55 +0000
commit82f90704a0662bba7254cb0bc262d785acdabc67 (patch)
tree72d32a909661d7f26217eee66ffe1d068dcfe101 /src/Ryujinx.HLE/HOS/Services/Sockets
parentf978d3726a87dcc067abb2541b96b831e4390fbb (diff)
Blocks should be synchronized on read-only fields (#5212)
* Blocks should be synchronized on read-only fields * more readonlys * fix alignment * more * Update ISelfController.cs * simplify new * simplify new
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Sockets')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/EventFileDescriptor.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs
index a93f176a..b0ac6e68 100644
--- a/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Sockets/Bsd/BsdContext.cs
@@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
{
private static ConcurrentDictionary<ulong, BsdContext> _registry = new ConcurrentDictionary<ulong, BsdContext>();
- private readonly object _lock = new object();
+ private readonly object _lock = new();
private List<IFileDescriptor> _fds;
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 6514d485..d7b53158 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 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl
private ulong _value;
private readonly EventFdFlags _flags;
- private object _lock = new object();
+ private readonly object _lock = new();
public bool Blocking { get => !_flags.HasFlag(EventFdFlags.NonBlocking); set => throw new NotSupportedException(); }