mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 22:54:24 -04:00
kern: devirtualize most things that are free to devirtualize (see #1672)
This commit is contained in:
parent
aaa3770806
commit
d0cd511c0e
13 changed files with 89 additions and 89 deletions
|
@ -528,7 +528,8 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
/* Get the thread context. */
|
||||
return this->GetThreadContextImpl(out, thread, context_flags);
|
||||
static_assert(std::derived_from<KDebug, KDebugBase>);
|
||||
return static_cast<KDebug *>(this)->GetThreadContextImpl(out, thread, context_flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -619,7 +620,8 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
/* Set the thread context. */
|
||||
return this->SetThreadContextImpl(ctx, thread, context_flags);
|
||||
static_assert(std::derived_from<KDebug, KDebugBase>);
|
||||
return static_cast<KDebug *>(this)->SetThreadContextImpl(ctx, thread, context_flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -984,6 +986,14 @@ namespace ams::kern {
|
|||
return this->GetDebugEventInfoImpl(out);
|
||||
}
|
||||
|
||||
void KDebugBase::Finalize() {
|
||||
/* Perform base finalization. */
|
||||
KSynchronizationObject::Finalize();
|
||||
|
||||
/* Perform post-synchronization finalization. */
|
||||
this->OnFinalizeSynchronizationObject();
|
||||
}
|
||||
|
||||
void KDebugBase::OnFinalizeSynchronizationObject() {
|
||||
/* Detach from our process, if we have one. */
|
||||
if (this->IsAttached() && this->OpenProcess()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue