diff options
author | bunnei <bunneidev@gmail.com> | 2022-01-18 03:08:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 03:08:24 +0100 |
commit | 101d86897b729ca66caf7cfee246e6f238ecf723 (patch) | |
tree | 92b516dd4958ca01bb5544a475011a2634412132 /src/core/hle/kernel/k_worker_task_manager.h | |
parent | Merge pull request #7724 from ameerj/astc_new_nv (diff) | |
parent | core: hle: kernel: KThread: Integrate with KWorkerTask and implement DoWorkerTaskImpl. (diff) | |
download | yuzu-101d86897b729ca66caf7cfee246e6f238ecf723.tar yuzu-101d86897b729ca66caf7cfee246e6f238ecf723.tar.gz yuzu-101d86897b729ca66caf7cfee246e6f238ecf723.tar.bz2 yuzu-101d86897b729ca66caf7cfee246e6f238ecf723.tar.lz yuzu-101d86897b729ca66caf7cfee246e6f238ecf723.tar.xz yuzu-101d86897b729ca66caf7cfee246e6f238ecf723.tar.zst yuzu-101d86897b729ca66caf7cfee246e6f238ecf723.zip |
Diffstat (limited to 'src/core/hle/kernel/k_worker_task_manager.h')
-rw-r--r-- | src/core/hle/kernel/k_worker_task_manager.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_worker_task_manager.h b/src/core/hle/kernel/k_worker_task_manager.h new file mode 100644 index 000000000..43d1bfcec --- /dev/null +++ b/src/core/hle/kernel/k_worker_task_manager.h @@ -0,0 +1,33 @@ +// Copyright 2022 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "common/common_types.h" +#include "common/thread_worker.h" + +namespace Kernel { + +class KernelCore; +class KWorkerTask; + +class KWorkerTaskManager final { +public: + enum class WorkerType : u32 { + Exit, + Count, + }; + + KWorkerTaskManager(); + + static void AddTask(KernelCore& kernel_, WorkerType type, KWorkerTask* task); + +private: + void AddTask(KernelCore& kernel, KWorkerTask* task); + +private: + Common::ThreadWorker m_waiting_thread; +}; + +} // namespace Kernel |