misc: chore: Use explicit types in CPU project
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
|
||||
public HvAddressSpace(MemoryBlock backingMemory, ulong asSize)
|
||||
{
|
||||
(_asBase, var ipaAllocator) = HvVm.CreateAddressSpace(backingMemory);
|
||||
(_asBase, HvIpaAllocator ipaAllocator) = HvVm.CreateAddressSpace(backingMemory);
|
||||
_backingSize = backingMemory.Size;
|
||||
|
||||
_userRange = new HvAddressSpaceRange(ipaAllocator);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
|
||||
public HvMemoryBlockAllocation Allocate(ulong size, ulong alignment)
|
||||
{
|
||||
var allocation = Allocate(size, alignment, CreateBlock);
|
||||
Allocation allocation = Allocate(size, alignment, CreateBlock);
|
||||
|
||||
return new HvMemoryBlockAllocation(this, allocation.Block, allocation.Offset, allocation.Size);
|
||||
}
|
||||
|
||||
@@ -233,13 +233,13 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
yield break;
|
||||
}
|
||||
|
||||
var guestRegions = GetPhysicalRegionsImpl(va, size);
|
||||
IEnumerable<MemoryRange> guestRegions = GetPhysicalRegionsImpl(va, size);
|
||||
if (guestRegions == null)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var guestRegion in guestRegions)
|
||||
foreach (MemoryRange guestRegion in guestRegions)
|
||||
{
|
||||
nint pointer = _backingMemory.GetPointer(guestRegion.Address, guestRegion.Size);
|
||||
yield return new HostMemoryRange((nuint)(ulong)pointer, guestRegion.Size);
|
||||
@@ -254,7 +254,7 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var physicalRegion in GetPhysicalRegionsImpl(va, size))
|
||||
foreach (MemoryRange physicalRegion in GetPhysicalRegionsImpl(va, size))
|
||||
{
|
||||
yield return physicalRegion;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
{
|
||||
// Calculate our time delta in ticks based on the current clock frequency.
|
||||
|
||||
int result = TimeApi.mach_timebase_info(out var timeBaseInfo);
|
||||
int result = TimeApi.mach_timebase_info(out MachTimebaseInfo timeBaseInfo);
|
||||
|
||||
Debug.Assert(result == 0);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Ryujinx.Cpu.AppleHv
|
||||
baseAddress = ipaAllocator.Allocate(block.Size, AsIpaAlignment);
|
||||
}
|
||||
|
||||
var rwx = HvMemoryFlags.Read | HvMemoryFlags.Write | HvMemoryFlags.Exec;
|
||||
HvMemoryFlags rwx = HvMemoryFlags.Read | HvMemoryFlags.Write | HvMemoryFlags.Exec;
|
||||
|
||||
HvApi.hv_vm_map((ulong)block.Pointer, baseAddress, block.Size, rwx).ThrowOnError();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user