diff options
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index c47fa9167..37e893c84 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -333,13 +333,21 @@ static ResultCode SendSyncRequest(Core::System& system, Handle handle) { | |||
| 333 | thread->SetStatus(ThreadStatus::WaitIPC); | 333 | thread->SetStatus(ThreadStatus::WaitIPC); |
| 334 | session->SendSyncRequest(SharedFrom(thread), system.Memory()); | 334 | session->SendSyncRequest(SharedFrom(thread), system.Memory()); |
| 335 | } | 335 | } |
| 336 | |||
| 336 | if (thread->HasHLECallback()) { | 337 | if (thread->HasHLECallback()) { |
| 337 | Handle event_handle = thread->GetHLETimeEvent(); | 338 | Handle event_handle = thread->GetHLETimeEvent(); |
| 338 | if (event_handle != InvalidHandle) { | 339 | if (event_handle != InvalidHandle) { |
| 339 | auto& time_manager = system.Kernel().TimeManager(); | 340 | auto& time_manager = system.Kernel().TimeManager(); |
| 340 | time_manager.UnscheduleTimeEvent(event_handle); | 341 | time_manager.UnscheduleTimeEvent(event_handle); |
| 341 | } | 342 | } |
| 342 | thread->InvokeHLECallback(SharedFrom(thread)); | 343 | |
| 344 | { | ||
| 345 | SchedulerLock lock(system.Kernel()); | ||
| 346 | auto* sync_object = thread->GetHLESyncObject(); | ||
| 347 | sync_object->RemoveWaitingThread(SharedFrom(thread)); | ||
| 348 | |||
| 349 | thread->InvokeHLECallback(SharedFrom(thread)); | ||
| 350 | } | ||
| 343 | } | 351 | } |
| 344 | 352 | ||
| 345 | return thread->GetSignalingResult(); | 353 | return thread->GetSignalingResult(); |