mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-20 09:55:07 -04:00
microkernel: hot paths are pretty fucking hot
This commit is contained in:
parent
331fa1d00d
commit
ab8de72db0
6 changed files with 199 additions and 179 deletions
|
@ -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);
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
namespace ams::kern {
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize ("-O2")
|
||||
|
||||
namespace ipc {
|
||||
|
||||
using MessageBuffer = ams::svc::ipc::MessageBuffer;
|
||||
|
@ -1362,4 +1365,6 @@ namespace ams::kern {
|
|||
this->NotifyAvailable(svc::ResultSessionClosed());
|
||||
}
|
||||
|
||||
#pragma GCC pop_options
|
||||
|
||||
}
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
namespace ams::kern::svc {
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize ("-O2")
|
||||
|
||||
/* ============================= Common ============================= */
|
||||
|
||||
namespace {
|
||||
|
@ -304,4 +307,6 @@ namespace ams::kern::svc {
|
|||
return ReplyAndReceiveWithUserBuffer(out_index, message_buffer, message_buffer_size, handles, num_handles, reply_target, timeout_ns);
|
||||
}
|
||||
|
||||
#pragma GCC pop_options
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue