summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/kernel/k_address_arbiter.cpp6
-rw-r--r--src/core/hle/kernel/k_light_condition_variable.cpp8
-rw-r--r--src/core/hle/kernel/k_synchronization_object.cpp18
-rw-r--r--src/core/hle/kernel/k_thread.cpp9
-rw-r--r--src/core/hle/kernel/k_thread.h4
-rw-r--r--src/core/hle/kernel/k_thread_queue.h2
6 files changed, 21 insertions, 26 deletions
diff --git a/src/core/hle/kernel/k_address_arbiter.cpp b/src/core/hle/kernel/k_address_arbiter.cpp
index 165475fbf..a4ce99402 100644
--- a/src/core/hle/kernel/k_address_arbiter.cpp
+++ b/src/core/hle/kernel/k_address_arbiter.cpp
@@ -87,9 +87,6 @@ bool UpdateIfEqual(Core::System& system, s32* out, VAddr address, s32 value, s32
}
class ThreadQueueImplForKAddressArbiter final : public KThreadQueue {
-private:
- KAddressArbiter::ThreadTree* m_tree;
-
public:
explicit ThreadQueueImplForKAddressArbiter(KernelCore& kernel_, KAddressArbiter::ThreadTree* t)
: KThreadQueue(kernel_), m_tree(t) {}
@@ -105,6 +102,9 @@ public:
// Invoke the base cancel wait handler.
KThreadQueue::CancelWait(waiting_thread, wait_result, cancel_timer_task);
}
+
+private:
+ KAddressArbiter::ThreadTree* m_tree;
};
} // namespace
diff --git a/src/core/hle/kernel/k_light_condition_variable.cpp b/src/core/hle/kernel/k_light_condition_variable.cpp
index 9ff710084..7319a0ca0 100644
--- a/src/core/hle/kernel/k_light_condition_variable.cpp
+++ b/src/core/hle/kernel/k_light_condition_variable.cpp
@@ -13,10 +13,6 @@ namespace Kernel {
namespace {
class ThreadQueueImplForKLightConditionVariable final : public KThreadQueue {
-private:
- KThread::WaiterList* m_wait_list;
- bool m_allow_terminating_thread;
-
public:
ThreadQueueImplForKLightConditionVariable(KernelCore& kernel_, KThread::WaiterList* wl,
bool term)
@@ -35,6 +31,10 @@ public:
// Invoke the base cancel wait handler.
KThreadQueue::CancelWait(waiting_thread, wait_result, cancel_timer_task);
}
+
+private:
+ KThread::WaiterList* m_wait_list;
+ bool m_allow_terminating_thread;
};
} // namespace
diff --git a/src/core/hle/kernel/k_synchronization_object.cpp b/src/core/hle/kernel/k_synchronization_object.cpp
index ba8fc4010..ffeb4b73f 100644
--- a/src/core/hle/kernel/k_synchronization_object.cpp
+++ b/src/core/hle/kernel/k_synchronization_object.cpp
@@ -17,19 +17,10 @@ namespace Kernel {
namespace {
class ThreadQueueImplForKSynchronizationObjectWait final : public KThreadQueueWithoutEndWait {
-private:
- using ThreadListNode = KSynchronizationObject::ThreadListNode;
-
-private:
- KSynchronizationObject** m_objects;
- ThreadListNode* m_nodes;
- s32 m_count;
-
public:
ThreadQueueImplForKSynchronizationObjectWait(KernelCore& kernel_, KSynchronizationObject** o,
- ThreadListNode* n, s32 c)
- : KThreadQueueWithoutEndWait(kernel_), m_objects(o), m_nodes(n), m_count(c) { // ...
- }
+ KSynchronizationObject::ThreadListNode* n, s32 c)
+ : KThreadQueueWithoutEndWait(kernel_), m_objects(o), m_nodes(n), m_count(c) {}
virtual void NotifyAvailable(KThread* waiting_thread, KSynchronizationObject* signaled_object,
ResultCode wait_result) override {
@@ -68,6 +59,11 @@ public:
// Invoke the base cancel wait handler.
KThreadQueue::CancelWait(waiting_thread, wait_result, cancel_timer_task);
}
+
+private:
+ KSynchronizationObject** m_objects;
+ KSynchronizationObject::ThreadListNode* m_nodes;
+ s32 m_count;
};
} // namespace
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index 7ef52a240..813b92ea4 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -68,13 +68,9 @@ public:
};
class ThreadQueueImplForKThreadSetProperty final : public KThreadQueue {
-private:
- KThread::WaiterList* m_wait_list;
-
public:
explicit ThreadQueueImplForKThreadSetProperty(KernelCore& kernel_, KThread::WaiterList* wl)
- : KThreadQueue(kernel_), m_wait_list(wl) { // ...
- }
+ : KThreadQueue(kernel_), m_wait_list(wl) {}
virtual void CancelWait(KThread* waiting_thread, ResultCode wait_result,
bool cancel_timer_task) override {
@@ -84,6 +80,9 @@ public:
// Invoke the base cancel wait handler.
KThreadQueue::CancelWait(waiting_thread, wait_result, cancel_timer_task);
}
+
+private:
+ KThread::WaiterList* m_wait_list;
};
} // namespace
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h
index 6d68c2399..1cde71e89 100644
--- a/src/core/hle/kernel/k_thread.h
+++ b/src/core/hle/kernel/k_thread.h
@@ -199,7 +199,7 @@ public:
synced_index = index;
}
- constexpr s32 GetSyncedIndex() const {
+ [[nodiscard]] constexpr s32 GetSyncedIndex() const {
return synced_index;
}
@@ -207,7 +207,7 @@ public:
wait_result = wait_res;
}
- constexpr ResultCode GetWaitResult() const {
+ [[nodiscard]] constexpr ResultCode GetWaitResult() const {
return wait_result;
}
diff --git a/src/core/hle/kernel/k_thread_queue.h b/src/core/hle/kernel/k_thread_queue.h
index fddf16e8b..1f13cde83 100644
--- a/src/core/hle/kernel/k_thread_queue.h
+++ b/src/core/hle/kernel/k_thread_queue.h
@@ -12,7 +12,7 @@ namespace Kernel {
class KThreadQueue {
public:
explicit KThreadQueue(KernelCore& kernel_) : kernel{kernel_} {}
- virtual ~KThreadQueue(){};
+ virtual ~KThreadQueue() = default;
virtual void NotifyAvailable(KThread* waiting_thread, KSynchronizationObject* signaled_object,
ResultCode wait_result);