diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 6cdabdf64c..3f40eeae52 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -5083,7 +5083,11 @@ bool spu_thread::set_ch_value(u32 ch, u32 value) spu_log.trace("sys_spu_thread_throw_event(spup=%d, data0=0x%x, data1=0x%x)", spup, value & 0x00ffffff, data); - const auto queue = (std::lock_guard{group->mutex}, this->spup[spup]); + std::shared_ptr queue; + { + std::lock_guard lock{group->mutex}; + queue = this->spup[spup]; + } // TODO: check passing spup value if (auto res = queue ? queue->send(SYS_SPU_THREAD_EVENT_USER_KEY, lv2_id, (u64{spup} << 32) | (value & 0x00ffffff), data) : CELL_ENOTCONN) @@ -5980,8 +5984,6 @@ spu_exec_object spu_thread::capture_memory_as_elf(std::span>(all_data.data(), pc0)}; - // Try to find a function entry (very basic) if (is_exec_code(pc0, all_data.data())) break; diff --git a/rpcs3/Emu/VFS.cpp b/rpcs3/Emu/VFS.cpp index 86c41a498f..b4042a5c91 100644 --- a/rpcs3/Emu/VFS.cpp +++ b/rpcs3/Emu/VFS.cpp @@ -154,7 +154,7 @@ bool vfs::unmount(std::string_view vpath) std::lock_guard lock(table.mutex); // Search entry recursively and remove it (including all children) - std::function unmount_children; + std::function unmount_children; unmount_children = [&entry_list, &unmount_children](vfs_directory& dir, usz depth) -> void { if (depth >= entry_list.size()) diff --git a/rpcs3/util/vm_native.cpp b/rpcs3/util/vm_native.cpp index b5c45eceaf..f0f37abbd4 100644 --- a/rpcs3/util/vm_native.cpp +++ b/rpcs3/util/vm_native.cpp @@ -82,7 +82,7 @@ namespace utils #if defined(MFD_HUGETLB) && defined(MFD_HUGE_2MB) constexpr int c_mfd_huge_2mb = MFD_HUGETLB | MFD_HUGE_2MB; -#else +#elif defined(__linux__) || defined(__FreeBSD__) constexpr int c_mfd_huge_2mb = 0; #endif