Skip destruction of adaptive mutex initializers

Based around similar behaviors implemented in the more-kernel branch. Hatsune Miku Project Diva X needs this.
This commit is contained in:
Stephen Miller 2024-11-13 11:44:44 -06:00
parent 75d2181489
commit 8c95a521d0

View File

@ -477,6 +477,10 @@ int PS4_SYSV_ABI scePthreadMutexDestroy(ScePthreadMutex* mutex) {
return SCE_KERNEL_ERROR_EINVAL;
}
if (*mutex == ORBIS_PTHREAD_MUTEX_ADAPTIVE_INITIALIZER) {
return ORBIS_OK;
}
int result = pthread_mutex_destroy(&(*mutex)->pth_mutex);
LOG_DEBUG(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result);