mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 12:47:11 +02:00
misc: chore: Fix object creation in HLE project
This commit is contained in:
parent
f1fd5c9366
commit
beab133c8d
48 changed files with 194 additions and 194 deletions
|
@ -105,7 +105,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
_blocksCount = blockShifts.Length;
|
||||
_blocks = new Block[_memoryBlockPageShifts.Length];
|
||||
|
||||
ArraySegment<ulong> currBitmapStorage = new ArraySegment<ulong>(new ulong[CalculateManagementOverheadSize(size, blockShifts)]);
|
||||
ArraySegment<ulong> currBitmapStorage = new(new ulong[CalculateManagementOverheadSize(size, blockShifts)]);
|
||||
|
||||
for (int i = 0; i < blockShifts.Length; i++)
|
||||
{
|
||||
|
|
|
@ -143,7 +143,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
bool shouldFillPages,
|
||||
byte fillValue)
|
||||
{
|
||||
using KScopedPageList scopedPageList = new KScopedPageList(Context.MemoryManager, pageList);
|
||||
using KScopedPageList scopedPageList = new(Context.MemoryManager, pageList);
|
||||
|
||||
ulong currentVa = address;
|
||||
|
||||
|
@ -188,7 +188,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
}
|
||||
}
|
||||
|
||||
using KScopedPageList scopedPageList = new KScopedPageList(Context.MemoryManager, pageList);
|
||||
using KScopedPageList scopedPageList = new(Context.MemoryManager, pageList);
|
||||
|
||||
foreach (KPageNode pageNode in pageList)
|
||||
{
|
||||
|
|
|
@ -617,7 +617,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
return result;
|
||||
}
|
||||
|
||||
using OnScopeExit _ = new OnScopeExit(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
|
||||
using OnScopeExit _ = new(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
|
||||
|
||||
return MapPages(address, pageList, permission, MemoryMapFlags.Private);
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
|
||||
Result result = region.AllocatePages(out KPageList pageList, pagesCount);
|
||||
|
||||
using OnScopeExit _ = new OnScopeExit(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
|
||||
using OnScopeExit _ = new(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
|
||||
|
||||
void CleanUpForError()
|
||||
{
|
||||
|
@ -1341,7 +1341,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
|
||||
Result result = region.AllocatePages(out KPageList pageList, remainingPages);
|
||||
|
||||
using OnScopeExit _ = new OnScopeExit(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
|
||||
using OnScopeExit _ = new(() => pageList.DecrementPagesReferenceCount(Context.MemoryManager));
|
||||
|
||||
void CleanUpForError()
|
||||
{
|
||||
|
@ -1867,7 +1867,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||
ulong dstLastPagePa = 0;
|
||||
ulong currentVa = va;
|
||||
|
||||
using OnScopeExit _ = new OnScopeExit(() =>
|
||||
using OnScopeExit _ = new(() =>
|
||||
{
|
||||
if (dstFirstPagePa != 0)
|
||||
{
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
|
||||
KProcess process = new(_context);
|
||||
|
||||
using OnScopeExit _ = new OnScopeExit(process.DecrementReferenceCount);
|
||||
using OnScopeExit _ = new(process.DecrementReferenceCount);
|
||||
|
||||
KResourceLimit resourceLimit;
|
||||
|
||||
|
@ -1425,7 +1425,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
|
||||
KCodeMemory codeMemory = new(_context);
|
||||
|
||||
using OnScopeExit _ = new OnScopeExit(codeMemory.DecrementReferenceCount);
|
||||
using OnScopeExit _ = new(codeMemory.DecrementReferenceCount);
|
||||
|
||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||
|
||||
|
|
|
@ -1232,7 +1232,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
{
|
||||
if (_schedulerWaitEvent == null)
|
||||
{
|
||||
ManualResetEvent schedulerWaitEvent = new ManualResetEvent(false);
|
||||
ManualResetEvent schedulerWaitEvent = new(false);
|
||||
|
||||
if (Interlocked.Exchange(ref _schedulerWaitEvent, schedulerWaitEvent) == null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue