diff --git a/src/core/libraries/kernel/thread_management.cpp b/src/core/libraries/kernel/thread_management.cpp index 3d6562671..fa0ef653e 100644 --- a/src/core/libraries/kernel/thread_management.cpp +++ b/src/core/libraries/kernel/thread_management.cpp @@ -237,7 +237,7 @@ int PS4_SYSV_ABI scePthreadAttrSetschedparam(ScePthreadAttr* attr, } // We always use SCHED_OTHER for now, so don't call this for now. - //int result = pthread_attr_setschedparam(&(*attr)->pth_attr, &pparam); + // int result = pthread_attr_setschedparam(&(*attr)->pth_attr, &pparam); int result = 0; return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL; } @@ -1245,7 +1245,8 @@ int PS4_SYSV_ABI scePthreadGetschedparam(ScePthread thread, int* policy, int PS4_SYSV_ABI scePthreadSetschedparam(ScePthread thread, int policy, const SceKernelSchedParam* param) { - LOG_ERROR(Kernel_Pthread, "(STUBBED) called policy={}, sched_priority={}", policy, param->sched_priority); + LOG_ERROR(Kernel_Pthread, "(STUBBED) called policy={}, sched_priority={}", policy, + param->sched_priority); return ORBIS_OK; } diff --git a/src/core/libraries/libs.h b/src/core/libraries/libs.h index 4f5622063..7cad7f8ba 100644 --- a/src/core/libraries/libs.h +++ b/src/core/libraries/libs.h @@ -25,7 +25,7 @@ struct wrapper_impl { static R PS4_SYSV_ABI wrap(Args... args) { if (std::string_view(name.value) != "scePthreadEqual" && std::string_view(name.value) != "sceUserServiceGetEvent") { - //LOG_WARNING(Core_Linker, "Function {} called", name.value); + // LOG_WARNING(Core_Linker, "Function {} called", name.value); } if constexpr (std::is_same_v || std::is_same_v) { const u32 ret = f(args...); @@ -42,7 +42,7 @@ struct wrapper_impl { template constexpr auto wrapper = wrapper_impl::wrap; -//#define W(foo) wrapper<#foo, decltype(&foo), foo> +// #define W(foo) wrapper<#foo, decltype(&foo), foo> #define W(foo) foo #define LIB_FUNCTION(nid, lib, libversion, mod, moduleVersionMajor, moduleVersionMinor, function) \ diff --git a/src/core/tls.cpp b/src/core/tls.cpp index 969118966..6fbcdc41d 100644 --- a/src/core/tls.cpp +++ b/src/core/tls.cpp @@ -125,9 +125,11 @@ static void PatchFsAccess(u8* code, const TLSPattern& tls_pattern, Xbyak::CodeGe const u32 idx2nd = slot % PthreadKeySecondLevelSize; const auto target_reg = Xbyak::Reg64(tls_pattern.target_reg); c.putSeg(fs); - c.mov(target_reg, qword[PthreadSpecificOffset + idx1st * 8]); // Load first level specific array. - c.mov(target_reg, qword[target_reg + idx2nd * 16 + 8]); // Load data member of pthread_key_data our slot specifies. - c.jmp(code + total_size); // Return to the instruction right after the mov. + c.mov(target_reg, + qword[PthreadSpecificOffset + idx1st * 8]); // Load first level specific array. + c.mov(target_reg, qword[target_reg + idx2nd * 16 + + 8]); // Load data member of pthread_key_data our slot specifies. + c.jmp(code + total_size); // Return to the instruction right after the mov. } #endif