2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

WaitSynch: Always reschedule (verified behavior on hw).

This commit is contained in:
bunnei 2015-02-09 22:05:39 -05:00
parent 4154560bd5
commit caa58acc84

View file

@ -144,6 +144,8 @@ static ResultCode WaitSynchronization1(Handle handle, s64 nano_seconds) {
LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle,
object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds); object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds);
HLE::Reschedule(__func__);
// Check for next thread to schedule // Check for next thread to schedule
if (object->ShouldWait()) { if (object->ShouldWait()) {
@ -153,8 +155,6 @@ static ResultCode WaitSynchronization1(Handle handle, s64 nano_seconds) {
// Create an event to wake the thread up after the specified nanosecond delay has passed // Create an event to wake the thread up after the specified nanosecond delay has passed
Kernel::GetCurrentThread()->WakeAfterDelay(nano_seconds); Kernel::GetCurrentThread()->WakeAfterDelay(nano_seconds);
HLE::Reschedule(__func__);
// NOTE: output of this SVC will be set later depending on how the thread resumes // NOTE: output of this SVC will be set later depending on how the thread resumes
return RESULT_INVALID; return RESULT_INVALID;
} }
@ -216,6 +216,8 @@ static ResultCode WaitSynchronizationN(s32* out, Handle* handles, s32 handle_cou
} }
} }
HLE::Reschedule(__func__);
// If thread should wait, then set its state to waiting and then reschedule... // If thread should wait, then set its state to waiting and then reschedule...
if (wait_thread) { if (wait_thread) {
@ -229,8 +231,6 @@ static ResultCode WaitSynchronizationN(s32* out, Handle* handles, s32 handle_cou
// Create an event to wake the thread up after the specified nanosecond delay has passed // Create an event to wake the thread up after the specified nanosecond delay has passed
Kernel::GetCurrentThread()->WakeAfterDelay(nano_seconds); Kernel::GetCurrentThread()->WakeAfterDelay(nano_seconds);
HLE::Reschedule(__func__);
// NOTE: output of this SVC will be set later depending on how the thread resumes // NOTE: output of this SVC will be set later depending on how the thread resumes
return RESULT_INVALID; return RESULT_INVALID;
} }