diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-22 00:27:01 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-22 02:49:43 +0100 |
commit | 731154f79e4f2e417a9db97e125eadb26b6b6f06 (patch) | |
tree | a9959e69723b4f19550834171c962ec06c9e34b7 /src/core | |
parent | Thread: Fix WaitSynchronization1 to not set register 1 on thread wakeup. (diff) | |
download | yuzu-731154f79e4f2e417a9db97e125eadb26b6b6f06.tar yuzu-731154f79e4f2e417a9db97e125eadb26b6b6f06.tar.gz yuzu-731154f79e4f2e417a9db97e125eadb26b6b6f06.tar.bz2 yuzu-731154f79e4f2e417a9db97e125eadb26b6b6f06.tar.lz yuzu-731154f79e4f2e417a9db97e125eadb26b6b6f06.tar.xz yuzu-731154f79e4f2e417a9db97e125eadb26b6b6f06.tar.zst yuzu-731154f79e4f2e417a9db97e125eadb26b6b6f06.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/svc.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 89095ac91..2d922046e 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -29,6 +29,9 @@ using Kernel::SharedPtr; namespace SVC { +/// An invalid result code that is meant to be overwritten when a thread resumes from waiting +const ResultCode RESULT_INVALID(0xDEADC0DE); + enum ControlMemoryOperation { MEMORY_OPERATION_HEAP = 0x00000003, MEMORY_OPERATION_GSP_HEAP = 0x00010003, @@ -132,10 +135,13 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) { Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThread(), nano_seconds); HLE::Reschedule(__func__); - } else { - object->Acquire(); + + // NOTE: output of this SVC will be set later depending on how the thread resumes + return RESULT_INVALID.raw; } + object->Acquire(); + return RESULT_SUCCESS.raw; } @@ -207,7 +213,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, HLE::Reschedule(__func__); // NOTE: output of this SVC will be set later depending on how the thread resumes - return 0xDEADBEEF; + return RESULT_INVALID.raw; } // Acquire objects if we did not wait... |