summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-10-27 01:55:33 -0300
committerGravatar ReinUsesLisp2020-10-27 01:55:39 -0300
commitce69ff2890e0a3a34ba6b80af6b3d60811c5f7ea (patch)
treebd70bdb254a59da749fac17b6b354ce8dbcde452 /src
parentMerge pull request #4805 from bunnei/update-defaults (diff)
downloadyuzu-ce69ff2890e0a3a34ba6b80af6b3d60811c5f7ea.tar.gz
yuzu-ce69ff2890e0a3a34ba6b80af6b3d60811c5f7ea.tar.xz
yuzu-ce69ff2890e0a3a34ba6b80af6b3d60811c5f7ea.zip
hle/kernel: Remove unused registered_core_threads to fix data races
This member was only used on asserts and it triggered data races. Remove it to fix them.
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/kernel.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index b2b5b8adf..bb3e312a7 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -86,8 +86,6 @@ struct KernelCore::Impl {
86 } 86 }
87 cores.clear(); 87 cores.clear();
88 88
89 registered_core_threads.reset();
90
91 process_list.clear(); 89 process_list.clear();
92 current_process = nullptr; 90 current_process = nullptr;
93 91
@@ -199,9 +197,7 @@ struct KernelCore::Impl {
199 const auto it = std::find(register_host_thread_keys.begin(), end, this_id); 197 const auto it = std::find(register_host_thread_keys.begin(), end, this_id);
200 ASSERT(core_id < Core::Hardware::NUM_CPU_CORES); 198 ASSERT(core_id < Core::Hardware::NUM_CPU_CORES);
201 ASSERT(it == end); 199 ASSERT(it == end);
202 ASSERT(!registered_core_threads[core_id]);
203 InsertHostThread(static_cast<u32>(core_id)); 200 InsertHostThread(static_cast<u32>(core_id));
204 registered_core_threads.set(core_id);
205 } 201 }
206 202
207 void RegisterHostThread() { 203 void RegisterHostThread() {
@@ -332,7 +328,6 @@ struct KernelCore::Impl {
332 328
333 // 0-3 IDs represent core threads, >3 represent others 329 // 0-3 IDs represent core threads, >3 represent others
334 std::atomic<u32> registered_thread_ids{Core::Hardware::NUM_CPU_CORES}; 330 std::atomic<u32> registered_thread_ids{Core::Hardware::NUM_CPU_CORES};
335 std::bitset<Core::Hardware::NUM_CPU_CORES> registered_core_threads;
336 331
337 // Number of host threads is a relatively high number to avoid overflowing 332 // Number of host threads is a relatively high number to avoid overflowing
338 static constexpr size_t NUM_REGISTRABLE_HOST_THREADS = 64; 333 static constexpr size_t NUM_REGISTRABLE_HOST_THREADS = 64;