mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-15 07:34:23 -04:00
kern: devirtualize KAutoObjectWithList::GetId()
This commit is contained in:
parent
3e4acc62f3
commit
8a661cee6e
8 changed files with 351 additions and 97 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue