kernel: Implement posix_pthread_once (#297)
* kernel: Implement posix_pthread_once * Fix clang format
This commit is contained in:
parent
384ea359ed
commit
485d4fd0fb
|
@ -835,6 +835,10 @@ int PS4_SYSV_ABI posix_pthread_mutexattr_destroy(ScePthreadMutexattr* attr) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI posix_pthread_once(pthread_once_t* once_control, void (*init_routine)(void)) {
|
||||||
|
return pthread_once(once_control, init_routine);
|
||||||
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI posix_pthread_mutexattr_setprotocol(ScePthreadMutexattr* attr, int protocol) {
|
int PS4_SYSV_ABI posix_pthread_mutexattr_setprotocol(ScePthreadMutexattr* attr, int protocol) {
|
||||||
int result = scePthreadMutexattrSetprotocol(attr, protocol);
|
int result = scePthreadMutexattrSetprotocol(attr, protocol);
|
||||||
LOG_INFO(Kernel_Pthread, "redirect to scePthreadMutexattrSetprotocol: result = {}", result);
|
LOG_INFO(Kernel_Pthread, "redirect to scePthreadMutexattrSetprotocol: result = {}", result);
|
||||||
|
@ -1412,6 +1416,7 @@ void pthreadSymbolsRegister(Core::Loader::SymbolsResolver* sym) {
|
||||||
posix_pthread_mutexattr_setprotocol);
|
posix_pthread_mutexattr_setprotocol);
|
||||||
LIB_FUNCTION("HF7lK46xzjY", "libScePosix", 1, "libkernel", 1, 1,
|
LIB_FUNCTION("HF7lK46xzjY", "libScePosix", 1, "libkernel", 1, 1,
|
||||||
posix_pthread_mutexattr_destroy);
|
posix_pthread_mutexattr_destroy);
|
||||||
|
LIB_FUNCTION("Z4QosVuAsA0", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_once);
|
||||||
|
|
||||||
// openorbis weird functions
|
// openorbis weird functions
|
||||||
LIB_FUNCTION("7H0iTOciTLo", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_lock);
|
LIB_FUNCTION("7H0iTOciTLo", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_lock);
|
||||||
|
|
Loading…
Reference in New Issue