microkernel: hot paths are pretty fucking hot

This commit is contained in:
Michael Scire 2020-12-02 02:14:24 -08:00 committed by SciresM
parent 331fa1d00d
commit ab8de72db0
6 changed files with 199 additions and 179 deletions

View file

@ -3054,6 +3054,9 @@ namespace ams::kern {
return ResultSuccess();
}
#pragma GCC push_options
#pragma GCC optimize ("-O2")
Result KPageTableBase::SetupForIpcClient(PageLinkedList *page_list, size_t *out_blocks_needed, KProcessAddress address, size_t size, KMemoryPermission test_perm, KMemoryState dst_state) {
/* Validate pre-conditions. */
MESOSPHERE_ASSERT(this->IsLockedByCurrentThread());
@ -3707,6 +3710,8 @@ namespace ams::kern {
}
}
#pragma GCC pop_options
Result KPageTableBase::MapPhysicalMemory(KProcessAddress address, size_t size) {
/* Lock the physical memory lock. */
KScopedLightLock phys_lk(this->map_physical_memory_lock);