mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 20:15:03 +00:00
clang format
This commit is contained in:
parent
736b451f82
commit
d0c3ce6413
@ -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.
|
// 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;
|
int result = 0;
|
||||||
return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL;
|
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,
|
int PS4_SYSV_ABI scePthreadSetschedparam(ScePthread thread, int policy,
|
||||||
const SceKernelSchedParam* param) {
|
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;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ struct wrapper_impl<name, PS4_SYSV_ABI R (*)(Args...), f> {
|
|||||||
static R PS4_SYSV_ABI wrap(Args... args) {
|
static R PS4_SYSV_ABI wrap(Args... args) {
|
||||||
if (std::string_view(name.value) != "scePthreadEqual" &&
|
if (std::string_view(name.value) != "scePthreadEqual" &&
|
||||||
std::string_view(name.value) != "sceUserServiceGetEvent") {
|
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<R, s32> || std::is_same_v<R, u32>) {
|
if constexpr (std::is_same_v<R, s32> || std::is_same_v<R, u32>) {
|
||||||
const u32 ret = f(args...);
|
const u32 ret = f(args...);
|
||||||
@ -42,7 +42,7 @@ struct wrapper_impl<name, PS4_SYSV_ABI R (*)(Args...), f> {
|
|||||||
template <StringLiteral name, class F, F f>
|
template <StringLiteral name, class F, F f>
|
||||||
constexpr auto wrapper = wrapper_impl<name, F, f>::wrap;
|
constexpr auto wrapper = wrapper_impl<name, F, f>::wrap;
|
||||||
|
|
||||||
//#define W(foo) wrapper<#foo, decltype(&foo), foo>
|
// #define W(foo) wrapper<#foo, decltype(&foo), foo>
|
||||||
#define W(foo) foo
|
#define W(foo) foo
|
||||||
|
|
||||||
#define LIB_FUNCTION(nid, lib, libversion, mod, moduleVersionMajor, moduleVersionMinor, function) \
|
#define LIB_FUNCTION(nid, lib, libversion, mod, moduleVersionMajor, moduleVersionMinor, function) \
|
||||||
|
@ -125,9 +125,11 @@ static void PatchFsAccess(u8* code, const TLSPattern& tls_pattern, Xbyak::CodeGe
|
|||||||
const u32 idx2nd = slot % PthreadKeySecondLevelSize;
|
const u32 idx2nd = slot % PthreadKeySecondLevelSize;
|
||||||
const auto target_reg = Xbyak::Reg64(tls_pattern.target_reg);
|
const auto target_reg = Xbyak::Reg64(tls_pattern.target_reg);
|
||||||
c.putSeg(fs);
|
c.putSeg(fs);
|
||||||
c.mov(target_reg, qword[PthreadSpecificOffset + idx1st * 8]); // Load first level specific array.
|
c.mov(target_reg,
|
||||||
c.mov(target_reg, qword[target_reg + idx2nd * 16 + 8]); // Load data member of pthread_key_data our slot specifies.
|
qword[PthreadSpecificOffset + idx1st * 8]); // Load first level specific array.
|
||||||
c.jmp(code + total_size); // Return to the instruction right after the mov.
|
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
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user