summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_worker_task_manager.h
blob: 43d1bfcec423063e19b747ab90d864fb31094690 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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