From 7d16b2d2ddd170a24cc09f258fbf2e56f34b009d Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 16 Nov 2019 11:05:39 -0400 Subject: Kernel: Correct Cancel Synchronization. This commit corrects the behavior of cancel synchronization when the thread is running/ready and ensures the next wait is cancelled as it's suppose to. --- src/core/hle/kernel/thread.h | 9 +++++++++ 1 file changed, 9 insertions(+) (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 c9870873d..25a6ed234 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h @@ -440,6 +440,14 @@ public: is_running = value; } + bool IsSyncCancelled() const { + return is_sync_cancelled; + } + + void SetSyncCancelled(bool value) { + is_sync_cancelled = value; + } + private: explicit Thread(KernelCore& kernel); ~Thread() override; @@ -524,6 +532,7 @@ private: u32 scheduling_state = 0; bool is_running = false; + bool is_sync_cancelled = false; std::string name; }; -- cgit v1.2.3