hle: kernel: Cleanup to match coding style.
This commit is contained in:
parent
316a2dd22a
commit
8f4ff06c4c
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue