summaryrefslogtreecommitdiffstats
path: root/src/core/core_cpu.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-05-03 06:34:54 +0200
committerbunnei <bunneidev@gmail.com>2018-05-11 01:34:47 +0200
commit9bf2a428f9e9359763be1bfd90c32371044c711e (patch)
tree89188fea0b3457421fe203cc7a2754523d0acf04 /src/core/core_cpu.cpp
parentcore: Support session close with multicore. (diff)
downloadyuzu-9bf2a428f9e9359763be1bfd90c32371044c711e.tar
yuzu-9bf2a428f9e9359763be1bfd90c32371044c711e.tar.gz
yuzu-9bf2a428f9e9359763be1bfd90c32371044c711e.tar.bz2
yuzu-9bf2a428f9e9359763be1bfd90c32371044c711e.tar.lz
yuzu-9bf2a428f9e9359763be1bfd90c32371044c711e.tar.xz
yuzu-9bf2a428f9e9359763be1bfd90c32371044c711e.tar.zst
yuzu-9bf2a428f9e9359763be1bfd90c32371044c711e.zip
Diffstat (limited to '')
-rw-r--r--src/core/core_cpu.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/core_cpu.cpp b/src/core/core_cpu.cpp
index bd9869d28..099f2bb1a 100644
--- a/src/core/core_cpu.cpp
+++ b/src/core/core_cpu.cpp
@@ -26,9 +26,12 @@ void CpuBarrier::NotifyEnd() {
}
bool CpuBarrier::Rendezvous() {
- if (end) {
- return false;
- } else {
+ if (!Settings::values.use_multi_core) {
+ // Meaningless when running in single-core mode
+ return true;
+ }
+
+ if (!end) {
std::unique_lock<std::mutex> lock(mutex);
--cores_waiting;
@@ -41,6 +44,8 @@ bool CpuBarrier::Rendezvous() {
condition.wait(lock);
return true;
}
+
+ return false;
}
Cpu::Cpu(std::shared_ptr<CpuBarrier> cpu_barrier, size_t core_index)