kern: devirtualize most things that are free to devirtualize (see #1672)
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user