kern/util: use custom atomics wrapper to substantially improve codegen
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user