improved scePthreadCondTimedwait

This commit is contained in:
georgemoralis 2024-05-21 12:22:30 +03:00
parent a34fcc4678
commit d1f6df5d82
1 changed files with 4 additions and 4 deletions

View File

@ -958,10 +958,10 @@ int PS4_SYSV_ABI scePthreadCondTimedwait(ScePthreadCond* cond, ScePthreadMutex*
if (mutex == nullptr || *mutex == nullptr) { if (mutex == nullptr || *mutex == nullptr) {
return SCE_KERNEL_ERROR_EINVAL; return SCE_KERNEL_ERROR_EINVAL;
} }
timespec* time; timespec time{};
time->tv_sec = usec / 1000000; time.tv_sec = usec / 1000000;
time->tv_nsec = ((usec % 1000000) * 1000); time.tv_nsec = ((usec % 1000000) * 1000);
int result = pthread_cond_timedwait(&(*cond)->cond, &(*mutex)->pth_mutex, time); int result = pthread_cond_timedwait(&(*cond)->cond, &(*mutex)->pth_mutex, &time);
LOG_INFO(Kernel_Pthread, "scePthreadCondTimedwait, result={}", result); LOG_INFO(Kernel_Pthread, "scePthreadCondTimedwait, result={}", result);