Fix clang formatting, DEBUG_ASSERT, and extra spacing

This commit is contained in:
Antonio 2024-09-03 16:28:35 -04:00
parent ed01f2f371
commit ab87394b25
2 changed files with 6 additions and 9 deletions

View file

@ -261,7 +261,7 @@ struct AddressSpace::Impl {
}
// Use assert to ensure success in debug builds
assert(success && "Failed to change virtual memory protection");
DEBUG_ASSERT(success && "Failed to change virtual memory protection");
}
HANDLE process{};
@ -504,11 +504,8 @@ void AddressSpace::Unmap(VAddr virtual_addr, size_t size, VAddr start_in_vma, VA
void AddressSpace::Protect(VAddr virtual_addr, size_t size, MemoryPermission perms) {
const bool read = True(perms & MemoryPermission::Read);
const bool write = True(perms & MemoryPermission::Write);
const bool execute = True(perms & MemoryPermission::Execute);
return impl->Protect(virtual_addr, size, read, write, execute);
}

View file

@ -297,7 +297,7 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
if (result == 0)
processed++;
}
}
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_PROTECT: {
result = sceKernelMProtect(entries[i].start, entries[i].length, entries[i].protection);
LOG_INFO(Kernel_Vmm, "BatchMap: entry = {}, operation = {}, len = {:#x}, result = {}",
@ -310,8 +310,8 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
processed++;
}
break;
}
}
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_TYPE_PROTECT: {
result = sceKernelMTypeProtect(entries[i].start, entries[i].length, entries[i].type,
entries[i].protection);
@ -325,8 +325,8 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
processed++;
}
break;
}
}
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_FLEXIBLE: {
result = sceKernelMapNamedFlexibleMemory(&entries[i].start, entries[i].length,
entries[i].protection, flags, "");