kern: mark KThread/KProcess.GetId() final to save virtual calls

This commit is contained in:
Michael Scire 2020-08-03 08:03:26 -07:00 committed by SciresM
parent e5b7eb89e5
commit cda15f08d8
3 changed files with 3 additions and 3 deletions

View File

@ -377,7 +377,7 @@ namespace ams::kern {
virtual void Finalize() override; virtual void Finalize() override;
virtual u64 GetId() const override { return this->GetProcessId(); } virtual u64 GetId() const override final { return this->GetProcessId(); }
virtual bool IsSignaled() const override { virtual bool IsSignaled() const override {
MESOSPHERE_ASSERT_THIS(); MESOSPHERE_ASSERT_THIS();

View File

@ -523,7 +523,7 @@ namespace ams::kern {
public: public:
/* Overridden parent functions. */ /* Overridden parent functions. */
virtual u64 GetId() const override { return this->GetThreadId(); } virtual u64 GetId() const override final { return this->GetThreadId(); }
virtual bool IsInitialized() const override { return this->initialized; } virtual bool IsInitialized() const override { return this->initialized; }
virtual uintptr_t GetPostDestroyArgument() const override { return reinterpret_cast<uintptr_t>(this->parent) | (this->resource_limit_release_hint ? 1 : 0); } virtual uintptr_t GetPostDestroyArgument() const override { return reinterpret_cast<uintptr_t>(this->parent) | (this->resource_limit_release_hint ? 1 : 0); }

View File

@ -83,4 +83,4 @@ namespace ams::kern {
::ams::kern::KTrace::PushRecord(::ams::kern::KTrace::Type_SvcExit1, PARAM5, PARAM6, PARAM7); \ ::ams::kern::KTrace::PushRecord(::ams::kern::KTrace::Type_SvcExit1, PARAM5, PARAM6, PARAM7); \
} \ } \
} \ } \
}) })