diff options
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; | |||
| 29 | 29 | ||
| 30 | namespace SVC { | 30 | namespace SVC { |
| 31 | 31 | ||
| 32 | /// An invalid result code that is meant to be overwritten when a thread resumes from waiting | ||
| 33 | const ResultCode RESULT_INVALID(0xDEADC0DE); | ||
| 34 | |||
| 32 | enum ControlMemoryOperation { | 35 | enum ControlMemoryOperation { |
| 33 | MEMORY_OPERATION_HEAP = 0x00000003, | 36 | MEMORY_OPERATION_HEAP = 0x00000003, |
| 34 | MEMORY_OPERATION_GSP_HEAP = 0x00010003, | 37 | MEMORY_OPERATION_GSP_HEAP = 0x00010003, |
| @@ -132,10 +135,13 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) { | |||
| 132 | Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThread(), nano_seconds); | 135 | Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThread(), nano_seconds); |
| 133 | 136 | ||
| 134 | HLE::Reschedule(__func__); | 137 | HLE::Reschedule(__func__); |
| 135 | } else { | 138 | |
| 136 | object->Acquire(); | 139 | // NOTE: output of this SVC will be set later depending on how the thread resumes |
| 140 | return RESULT_INVALID.raw; | ||
| 137 | } | 141 | } |
| 138 | 142 | ||
| 143 | object->Acquire(); | ||
| 144 | |||
| 139 | return RESULT_SUCCESS.raw; | 145 | return RESULT_SUCCESS.raw; |
| 140 | } | 146 | } |
| 141 | 147 | ||
| @@ -207,7 +213,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, | |||
| 207 | HLE::Reschedule(__func__); | 213 | HLE::Reschedule(__func__); |
| 208 | 214 | ||
| 209 | // NOTE: output of this SVC will be set later depending on how the thread resumes | 215 | // NOTE: output of this SVC will be set later depending on how the thread resumes |
| 210 | return 0xDEADBEEF; | 216 | return RESULT_INVALID.raw; |
| 211 | } | 217 | } |
| 212 | 218 | ||
| 213 | // Acquire objects if we did not wait... | 219 | // Acquire objects if we did not wait... |