diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-28 18:30:33 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-29 04:31:51 +0200 |
commit | 0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5 (patch) | |
tree | 2d7bb143d490c3984bff6deda426b818bf27d552 /src/core/hle/kernel/thread.h | |
parent | Merge pull request #1193 from lioncash/priv (diff) | |
download | yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.gz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.bz2 yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.lz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.xz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.zst yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/thread.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index 06edc296d..20f50458b 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -56,6 +56,7 @@ enum class ThreadWakeupReason { namespace Kernel { +class KernelCore; class Process; class Scheduler; @@ -63,6 +64,7 @@ class Thread final : public WaitObject { public: /** * Creates and returns a new thread. The new thread is immediately scheduled + * @param kernel The kernel instance this thread will be created under. * @param name The friendly name desired for the thread * @param entry_point The address at which the thread should start execution * @param priority The thread's priority @@ -72,8 +74,9 @@ public: * @param owner_process The parent process for the thread * @return A shared pointer to the newly created thread */ - static ResultVal<SharedPtr<Thread>> Create(std::string name, VAddr entry_point, u32 priority, - u64 arg, s32 processor_id, VAddr stack_top, + static ResultVal<SharedPtr<Thread>> Create(KernelCore& kernel, std::string name, + VAddr entry_point, u32 priority, u64 arg, + s32 processor_id, VAddr stack_top, SharedPtr<Process> owner_process); std::string GetName() const override { @@ -263,7 +266,7 @@ public: u64 affinity_mask{0x1}; private: - Thread(); + explicit Thread(KernelCore& kernel); ~Thread() override; std::shared_ptr<std::vector<u8>> tls_memory = std::make_shared<std::vector<u8>>(); @@ -271,12 +274,13 @@ private: /** * Sets up the primary application thread + * @param kernel The kernel instance to create the main thread under. * @param entry_point The address at which the thread should start execution * @param priority The priority to give the main thread * @param owner_process The parent process for the main thread * @return A shared pointer to the main thread */ -SharedPtr<Thread> SetupMainThread(VAddr entry_point, u32 priority, +SharedPtr<Thread> SetupMainThread(KernelCore& kernel, VAddr entry_point, u32 priority, SharedPtr<Process> owner_process); /** @@ -294,14 +298,4 @@ void WaitCurrentThread_Sleep(); */ void ExitCurrentThread(); -/** - * Initialize threading - */ -void ThreadingInit(); - -/** - * Shutdown threading - */ -void ThreadingShutdown(); - } // namespace Kernel |