From d917a9bf7774fac3d7bccda761976615722ff3e6 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Tue, 27 Jan 2015 02:40:21 -0200 Subject: [PATCH] Kernel: Mark all appropriate kernel objects as "final" --- src/core/hle/kernel/address_arbiter.h | 2 +- src/core/hle/kernel/event.h | 2 +- src/core/hle/kernel/mutex.h | 2 +- src/core/hle/kernel/semaphore.h | 2 +- src/core/hle/kernel/shared_memory.h | 2 +- src/core/hle/kernel/thread.h | 3 +-- src/core/hle/kernel/timer.h | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h index 536f0f017..638afff9e 100644 --- a/src/core/hle/kernel/address_arbiter.h +++ b/src/core/hle/kernel/address_arbiter.h @@ -26,7 +26,7 @@ enum class ArbitrationType : u32 { DecrementAndWaitIfLessThanWithTimeout, }; -class AddressArbiter : public Object { +class AddressArbiter final : public Object { public: /** * Creates an address arbiter. diff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.h index 47420b157..2c3e6b14e 100644 --- a/src/core/hle/kernel/event.h +++ b/src/core/hle/kernel/event.h @@ -11,7 +11,7 @@ namespace Kernel { -class Event : public WaitObject { +class Event final : public WaitObject { public: /** * Creates an event diff --git a/src/core/hle/kernel/mutex.h b/src/core/hle/kernel/mutex.h index a6d822e60..1e69528f1 100644 --- a/src/core/hle/kernel/mutex.h +++ b/src/core/hle/kernel/mutex.h @@ -14,7 +14,7 @@ namespace Kernel { class Thread; -class Mutex : public WaitObject { +class Mutex final : public WaitObject { public: /** * Creates a mutex. diff --git a/src/core/hle/kernel/semaphore.h b/src/core/hle/kernel/semaphore.h index b7f22b86e..9bb404ab6 100644 --- a/src/core/hle/kernel/semaphore.h +++ b/src/core/hle/kernel/semaphore.h @@ -13,7 +13,7 @@ namespace Kernel { -class Semaphore : public WaitObject { +class Semaphore final : public WaitObject { public: /** * Creates a semaphore. diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h index eb063d39d..f9ae23e93 100644 --- a/src/core/hle/kernel/shared_memory.h +++ b/src/core/hle/kernel/shared_memory.h @@ -23,7 +23,7 @@ enum class MemoryPermission : u32 { DontCare = (1u << 28) }; -class SharedMemory : public Object { +class SharedMemory final : public Object { public: /** * Creates a shared memory object diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 5fab1ab58..d6299364a 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -40,7 +40,7 @@ enum ThreadStatus { namespace Kernel { -class Thread : public WaitObject { +class Thread final : public WaitObject { public: static ResultVal> Create(std::string name, VAddr entry_point, s32 priority, u32 arg, s32 processor_id, VAddr stack_top, u32 stack_size); @@ -115,7 +115,6 @@ public: bool idle = false; private: - Thread() = default; }; diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h index 24552b4b9..c45e79954 100644 --- a/src/core/hle/kernel/timer.h +++ b/src/core/hle/kernel/timer.h @@ -11,7 +11,7 @@ namespace Kernel { -class Timer : public WaitObject { +class Timer final : public WaitObject { public: /** * Creates a timer