mirror of
https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
synced 2025-12-14 06:12:40 +00:00
hle: kernel: k_scheduler: Use atomics for current_thread, etc.
This commit is contained in:
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
/// Returns true if the scheduler is idle
|
||||
[[nodiscard]] bool IsIdle() const {
|
||||
return GetCurrentThread() == idle_thread;
|
||||
return GetCurrentThread() == idle_thread.get();
|
||||
}
|
||||
|
||||
/// Gets the timestamp for the last context switch in ticks.
|
||||
@@ -174,8 +174,9 @@ private:
|
||||
void SwitchToCurrent();
|
||||
|
||||
KThread* prev_thread{};
|
||||
KThread* current_thread{};
|
||||
KThread* idle_thread{};
|
||||
std::atomic<KThread*> current_thread{};
|
||||
|
||||
std::shared_ptr<KThread> idle_thread;
|
||||
|
||||
std::shared_ptr<Common::Fiber> switch_fiber{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user