summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_thread.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-12-18 22:37:19 +0100
committerLiam <byteslice@airmail.cc>2022-12-18 22:37:19 +0100
commit67c0d714c5b6e93ddb00d0807147b5673c011ac6 (patch)
treebd35994725d098c7371506d533390800d3253f3e /src/core/hle/kernel/k_thread.h
parentMerge pull request #9470 from german77/silenceIkillYou (diff)
downloadyuzu-67c0d714c5b6e93ddb00d0807147b5673c011ac6.tar
yuzu-67c0d714c5b6e93ddb00d0807147b5673c011ac6.tar.gz
yuzu-67c0d714c5b6e93ddb00d0807147b5673c011ac6.tar.bz2
yuzu-67c0d714c5b6e93ddb00d0807147b5673c011ac6.tar.lz
yuzu-67c0d714c5b6e93ddb00d0807147b5673c011ac6.tar.xz
yuzu-67c0d714c5b6e93ddb00d0807147b5673c011ac6.tar.zst
yuzu-67c0d714c5b6e93ddb00d0807147b5673c011ac6.zip
Diffstat (limited to 'src/core/hle/kernel/k_thread.h')
-rw-r--r--src/core/hle/kernel/k_thread.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h
index dc52b4ed3..1320451c0 100644
--- a/src/core/hle/kernel/k_thread.h
+++ b/src/core/hle/kernel/k_thread.h
@@ -22,6 +22,7 @@
#include "core/hle/kernel/k_light_lock.h"
#include "core/hle/kernel/k_spin_lock.h"
#include "core/hle/kernel/k_synchronization_object.h"
+#include "core/hle/kernel/k_timer_task.h"
#include "core/hle/kernel/k_worker_task.h"
#include "core/hle/kernel/slab_helpers.h"
#include "core/hle/kernel/svc_common.h"
@@ -112,7 +113,8 @@ void SetCurrentThread(KernelCore& kernel, KThread* thread);
[[nodiscard]] s32 GetCurrentCoreId(KernelCore& kernel);
class KThread final : public KAutoObjectWithSlabHeapAndContainer<KThread, KWorkerTask>,
- public boost::intrusive::list_base_hook<> {
+ public boost::intrusive::list_base_hook<>,
+ public KTimerTask {
KERNEL_AUTOOBJECT_TRAITS(KThread, KSynchronizationObject);
private:
@@ -660,7 +662,7 @@ private:
union SyncObjectBuffer {
std::array<KSynchronizationObject*, Svc::ArgumentHandleCountMax> sync_objects{};
std::array<Handle,
- Svc::ArgumentHandleCountMax*(sizeof(KSynchronizationObject*) / sizeof(Handle))>
+ Svc::ArgumentHandleCountMax * (sizeof(KSynchronizationObject*) / sizeof(Handle))>
handles;
constexpr SyncObjectBuffer() {}
};
@@ -681,10 +683,8 @@ private:
};
template <typename T>
- requires(
- std::same_as<T, KThread> ||
- std::same_as<T, RedBlackKeyType>) static constexpr int Compare(const T& lhs,
- const KThread& rhs) {
+ requires(std::same_as<T, KThread> || std::same_as<T, RedBlackKeyType>)
+ static constexpr int Compare(const T& lhs, const KThread& rhs) {
const u64 l_key = lhs.GetConditionVariableKey();
const u64 r_key = rhs.GetConditionVariableKey();
@@ -840,4 +840,8 @@ private:
KernelCore& kernel;
};
+inline void KTimerTask::OnTimer() {
+ static_cast<KThread*>(this)->OnTimer();
+}
+
} // namespace Kernel