kern: devirtualize KAutoObjectWithList::GetId()

This commit is contained in:
Michael Scire 2021-10-24 17:00:05 -07:00
parent 3e4acc62f3
commit 8a661cee6e
8 changed files with 351 additions and 97 deletions

View file

@ -610,7 +610,8 @@ namespace ams::kern {
size_t GetKernelStackUsage() const;
public:
/* Overridden parent functions. */
virtual u64 GetId() const override final { return this->GetThreadId(); }
ALWAYS_INLINE u64 GetIdImpl() const { return this->GetThreadId(); }
ALWAYS_INLINE u64 GetId() const { return this->GetIdImpl(); }
bool IsInitialized() const { return m_initialized; }
uintptr_t GetPostDestroyArgument() const { return reinterpret_cast<uintptr_t>(m_parent) | (m_resource_limit_release_hint ? 1 : 0); }
@ -664,16 +665,6 @@ namespace ams::kern {
return GetCurrentThread().GetCurrentCore();
}
ALWAYS_INLINE void KAutoObject::ScheduleDestruction() {
MESOSPHERE_ASSERT_THIS();
/* Set our object to destroy. */
m_next_closed_object = GetCurrentThread().GetClosedObject();
/* Set ourselves as the thread's next object to destroy. */
GetCurrentThread().SetClosedObject(this);
}
ALWAYS_INLINE void KTimerTask::OnTimer() {
static_cast<KThread *>(this)->OnTimer();
}