summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2019-04-17 07:08:12 -0400
committerGravatar Lioncash2019-04-17 09:30:56 -0400
commit433b59c1121a257ae3c1503fff5b71d3f3852ab5 (patch)
tree23f4cbe699ff28d3f5907aff55f49081623d419b /src/core/hle/kernel/thread.cpp
parentMerge pull request #2315 from ReinUsesLisp/severity-decompiler (diff)
downloadyuzu-433b59c1121a257ae3c1503fff5b71d3f3852ab5.tar.gz
yuzu-433b59c1121a257ae3c1503fff5b71d3f3852ab5.tar.xz
yuzu-433b59c1121a257ae3c1503fff5b71d3f3852ab5.zip
kernel/svc: Migrate svcCancelSynchronization behavior to a thread function
The actual behavior of this function is slightly more complex than what we're currently doing within the supervisor call. To avoid dumping most of this behavior in the supervisor call itself, we can migrate this to another function.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index ca52267b2..7d4fe9608 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -142,6 +142,12 @@ void Thread::ResumeFromWait() {
142 ChangeScheduler(); 142 ChangeScheduler();
143} 143}
144 144
145void Thread::CancelWait() {
146 ASSERT(GetStatus() == ThreadStatus::WaitSynchAny);
147 SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED);
148 ResumeFromWait();
149}
150
145/** 151/**
146 * Resets a thread context, making it ready to be scheduled and run by the CPU 152 * Resets a thread context, making it ready to be scheduled and run by the CPU
147 * @param context Thread context to reset 153 * @param context Thread context to reset