From 1a5d6de0d46371b74828a2582506f1b3b2362589 Mon Sep 17 00:00:00 2001 From: balika011 Date: Fri, 5 Oct 2018 14:51:16 -0400 Subject: thread: Make the scheduler pointer a regular pointer Conceptually, it doesn't make sense for a thread to be able to persist the lifetime of a scheduler. A scheduler should be taking care of the threads; the threads should not be taking care of the scheduler. If the threads outlive the scheduler (or we simply don't actually terminate/shutdown the threads), then it should be considered a bug that we need to fix. Attributing this to balika011, as they opened #1317 to attempt to fix this in a similar way, but my refactoring of the kernel code caused quite a few conflicts. --- src/core/hle/kernel/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/kernel/thread.h') diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index d2b191357..c6ffbd28c 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -419,7 +419,7 @@ private: /// available. In case of a timeout, the object will be nullptr. WakeupCallback wakeup_callback; - std::shared_ptr scheduler; + Scheduler* scheduler = nullptr; u32 ideal_core{0xFFFFFFFF}; u64 affinity_mask{0x1}; -- cgit v1.2.3