Migrate to .NET 9 (#198)

This commit is contained in:
Marco Carvalho 2024-12-19 21:52:25 -03:00 committed by GitHub
parent 8db5a7e98b
commit ff6628149d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
136 changed files with 278 additions and 270 deletions

View file

@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);._*</DefaultItemExcludes>
</PropertyGroup>

View file

@ -4,6 +4,7 @@ using Ryujinx.Horizon.Sdk.OsTypes;
using Ryujinx.Horizon.Sdk.Sf;
using System;
using System.Collections.Generic;
using System.Threading;
namespace Ryujinx.Horizon.Sdk.Friends.Detail.Ipc
{
@ -13,7 +14,7 @@ namespace Ryujinx.Horizon.Sdk.Friends.Detail.Ipc
private readonly Uid _userId;
private readonly FriendsServicePermissionLevel _permissionLevel;
private readonly object _lock = new();
private readonly Lock _lock = new();
private SystemEventType _notificationEvent;

View file

@ -3,6 +3,7 @@ using Ryujinx.Horizon.Sdk.Fs;
using System;
using System.IO;
using System.IO.Compression;
using System.Threading;
namespace Ryujinx.Horizon.Sdk.Ngc.Detail
{
@ -22,13 +23,12 @@ namespace Ryujinx.Horizon.Sdk.Ngc.Detail
}
private readonly IFsClient _fsClient;
private readonly object _lock;
private readonly Lock _lock = new();
private bool _intialized;
private ulong _cacheSize;
public ContentsReader(IFsClient fsClient)
{
_lock = new();
_fsClient = fsClient;
}

View file

@ -2,6 +2,7 @@ using Ryujinx.Common;
using Ryujinx.Horizon.Common;
using System;
using System.Collections.Generic;
using System.Threading;
namespace Ryujinx.Horizon.Sdk.OsTypes.Impl
{
@ -13,7 +14,7 @@ namespace Ryujinx.Horizon.Sdk.OsTypes.Impl
private readonly List<MultiWaitHolderBase> _multiWaits;
private readonly object _lock = new();
private readonly Lock _lock = new();
private int _waitingThreadHandle;

View file

@ -1,6 +1,7 @@
using Ryujinx.Horizon.Common;
using System;
using System.Collections.Generic;
using System.Threading;
namespace Ryujinx.Horizon.Sdk.Sf.Cmif
{
@ -209,14 +210,13 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
}
private readonly EntryManager _entryManager;
private readonly object _entryOwnerLock;
private readonly Lock _entryOwnerLock = new();
private readonly HashSet<Domain> _domains;
private readonly int _maxDomains;
public ServerDomainManager(int entryCount, int maxDomains)
{
_entryManager = new EntryManager(entryCount);
_entryOwnerLock = new object();
_domains = new HashSet<Domain>();
_maxDomains = maxDomains;
}

View file

@ -4,6 +4,7 @@ using Ryujinx.Horizon.Sdk.Sm;
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Threading;
namespace Ryujinx.Horizon.Sdk.Sf.Hipc
{
@ -17,7 +18,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Hipc
private readonly ulong _pointerBuffersBaseAddress;
private readonly ulong _savedMessagesBaseAddress;
private readonly object _resourceLock;
private readonly Lock _resourceLock = new();
private readonly ulong[] _sessionAllocationBitmap;
private readonly HashSet<ServerSession> _sessions;
private readonly HashSet<Server> _servers;
@ -42,7 +43,6 @@ namespace Ryujinx.Horizon.Sdk.Sf.Hipc
}
}
_resourceLock = new object();
_sessionAllocationBitmap = new ulong[(maxSessions + 63) / 64];
_sessions = new HashSet<ServerSession>();
_servers = new HashSet<Server>();

View file

@ -4,6 +4,7 @@ using Ryujinx.Horizon.Sdk.Sf.Cmif;
using Ryujinx.Horizon.Sdk.Sm;
using System;
using System.Linq;
using System.Threading;
namespace Ryujinx.Horizon.Sdk.Sf.Hipc
{
@ -16,8 +17,8 @@ namespace Ryujinx.Horizon.Sdk.Sf.Hipc
private readonly MultiWait _multiWait;
private readonly MultiWait _waitList;
private readonly object _multiWaitSelectionLock;
private readonly object _waitListLock;
private readonly Lock _multiWaitSelectionLock = new();
private readonly Lock _waitListLock = new();
private readonly Event _requestStopEvent;
private readonly Event _notifyEvent;
@ -39,9 +40,6 @@ namespace Ryujinx.Horizon.Sdk.Sf.Hipc
_multiWait = new MultiWait();
_waitList = new MultiWait();
_multiWaitSelectionLock = new object();
_waitListLock = new object();
_requestStopEvent = new Event(EventClearMode.ManualClear);
_notifyEvent = new Event(EventClearMode.ManualClear);