|
@@ -19,6 +19,7 @@
|
|
|
#include "core/hle/kernel/k_light_lock.h"
|
|
#include "core/hle/kernel/k_light_lock.h"
|
|
|
#include "core/hle/kernel/k_spin_lock.h"
|
|
#include "core/hle/kernel/k_spin_lock.h"
|
|
|
#include "core/hle/kernel/k_synchronization_object.h"
|
|
#include "core/hle/kernel/k_synchronization_object.h"
|
|
|
|
|
+#include "core/hle/kernel/k_worker_task.h"
|
|
|
#include "core/hle/kernel/slab_helpers.h"
|
|
#include "core/hle/kernel/slab_helpers.h"
|
|
|
#include "core/hle/kernel/svc_common.h"
|
|
#include "core/hle/kernel/svc_common.h"
|
|
|
#include "core/hle/kernel/svc_types.h"
|
|
#include "core/hle/kernel/svc_types.h"
|
|
@@ -100,7 +101,7 @@ enum class ThreadWaitReasonForDebugging : u32 {
|
|
|
[[nodiscard]] KThread& GetCurrentThread(KernelCore& kernel);
|
|
[[nodiscard]] KThread& GetCurrentThread(KernelCore& kernel);
|
|
|
[[nodiscard]] s32 GetCurrentCoreId(KernelCore& kernel);
|
|
[[nodiscard]] s32 GetCurrentCoreId(KernelCore& kernel);
|
|
|
|
|
|
|
|
-class KThread final : public KAutoObjectWithSlabHeapAndContainer<KThread, KSynchronizationObject>,
|
|
|
|
|
|
|
+class KThread final : public KAutoObjectWithSlabHeapAndContainer<KThread, KWorkerTask>,
|
|
|
public boost::intrusive::list_base_hook<> {
|
|
public boost::intrusive::list_base_hook<> {
|
|
|
KERNEL_AUTOOBJECT_TRAITS(KThread, KSynchronizationObject);
|
|
KERNEL_AUTOOBJECT_TRAITS(KThread, KSynchronizationObject);
|
|
|
|
|
|
|
@@ -385,6 +386,8 @@ public:
|
|
|
|
|
|
|
|
void OnTimer();
|
|
void OnTimer();
|
|
|
|
|
|
|
|
|
|
+ void DoWorkerTaskImpl();
|
|
|
|
|
+
|
|
|
static void PostDestroy(uintptr_t arg);
|
|
static void PostDestroy(uintptr_t arg);
|
|
|
|
|
|
|
|
[[nodiscard]] static ResultCode InitializeDummyThread(KThread* thread);
|
|
[[nodiscard]] static ResultCode InitializeDummyThread(KThread* thread);
|
|
@@ -679,6 +682,8 @@ private:
|
|
|
|
|
|
|
|
void StartTermination();
|
|
void StartTermination();
|
|
|
|
|
|
|
|
|
|
+ void FinishTermination();
|
|
|
|
|
+
|
|
|
[[nodiscard]] ResultCode Initialize(KThreadFunction func, uintptr_t arg, VAddr user_stack_top,
|
|
[[nodiscard]] ResultCode Initialize(KThreadFunction func, uintptr_t arg, VAddr user_stack_top,
|
|
|
s32 prio, s32 virt_core, KProcess* owner, ThreadType type);
|
|
s32 prio, s32 virt_core, KProcess* owner, ThreadType type);
|
|
|
|
|
|