summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-05-19 23:57:44 +0200
committerSubv <subv2112@gmail.com>2018-05-19 23:57:44 +0200
commitc74f2555b61fb411b4c3a0a54afecfee7f58b63d (patch)
treed61a7e8d482796502932845b867f1082ca4af727 /src/core/hle/kernel/svc.cpp
parentSVC: Removed unused WaitSynchronization1 function (diff)
downloadyuzu-c74f2555b61fb411b4c3a0a54afecfee7f58b63d.tar
yuzu-c74f2555b61fb411b4c3a0a54afecfee7f58b63d.tar.gz
yuzu-c74f2555b61fb411b4c3a0a54afecfee7f58b63d.tar.bz2
yuzu-c74f2555b61fb411b4c3a0a54afecfee7f58b63d.tar.lz
yuzu-c74f2555b61fb411b4c3a0a54afecfee7f58b63d.tar.xz
yuzu-c74f2555b61fb411b4c3a0a54afecfee7f58b63d.tar.zst
yuzu-c74f2555b61fb411b4c3a0a54afecfee7f58b63d.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 1eb1b8fbf..810ef66aa 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -202,7 +202,7 @@ static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64
thread->WakeAfterDelay(nano_seconds);
thread->wakeup_callback = DefaultThreadWakeupCallback;
- Core::System::GetInstance().PrepareReschedule();
+ Core::System::GetInstance().CpuCore(thread->processor_id).PrepareReschedule();
return RESULT_TIMEOUT;
}
@@ -365,7 +365,7 @@ static ResultCode SetThreadPriority(Handle handle, u32 priority) {
thread->SetPriority(priority);
- Core::System::GetInstance().PrepareReschedule();
+ Core::System::GetInstance().CpuCore(thread->processor_id).PrepareReschedule();
return RESULT_SUCCESS;
}
@@ -522,6 +522,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V
*out_handle = thread->guest_handle;
Core::System::GetInstance().PrepareReschedule();
+ Core::System::GetInstance().CpuCore(thread->processor_id).PrepareReschedule();
NGLOG_TRACE(Kernel_SVC,
"called entrypoint=0x{:08X} ({}), arg=0x{:08X}, stacktop=0x{:08X}, "
@@ -540,7 +541,10 @@ static ResultCode StartThread(Handle thread_handle) {
return ERR_INVALID_HANDLE;
}
+ ASSERT(thread->status == THREADSTATUS_DORMANT);
+
thread->ResumeFromWait();
+ Core::System::GetInstance().CpuCore(thread->processor_id).PrepareReschedule();
return RESULT_SUCCESS;
}