mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 23:24:26 -04:00
kern/util: use custom atomics wrapper to substantially improve codegen
This commit is contained in:
parent
52332e8d75
commit
d74f364107
26 changed files with 688 additions and 260 deletions
|
@ -25,31 +25,6 @@ namespace ams::kern {
|
|||
|
||||
}
|
||||
|
||||
void KDebugBase::ProcessHolder::Attach(KProcess *process) {
|
||||
MESOSPHERE_ASSERT(m_process == nullptr);
|
||||
|
||||
/* Set our process. */
|
||||
m_process = process;
|
||||
|
||||
/* Open reference to our process. */
|
||||
m_process->Open();
|
||||
|
||||
/* Set our reference count. */
|
||||
m_ref_count = 1;
|
||||
}
|
||||
|
||||
void KDebugBase::ProcessHolder::Detach() {
|
||||
/* Close our process, if we have one. */
|
||||
KProcess * const process = m_process;
|
||||
if (AMS_LIKELY(process != nullptr)) {
|
||||
/* Set our process to a debug sentinel value, which will cause crash if accessed. */
|
||||
m_process = reinterpret_cast<KProcess *>(1);
|
||||
|
||||
/* Close reference to our process. */
|
||||
process->Close();
|
||||
}
|
||||
}
|
||||
|
||||
void KDebugBase::Initialize() {
|
||||
/* Clear the continue flags. */
|
||||
m_continue_flags = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue