Fix an error where the pthread priority is not being set correctly.

This commit is contained in:
David Reid
2023-12-13 08:36:03 +10:00
parent ee3b7df66a
commit c29c001840
+4 -2
View File
@@ -16158,8 +16158,10 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
}
}
/* I'm not treating a failure of setting the priority as a critical error so not checking the return value here. */
pthread_attr_setschedparam(&attr, &sched);
/* I'm not treating a failure of setting the priority as a critical error so not aborting on failure here. */
if (pthread_attr_setschedparam(&attr, &sched) == 0) {
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
}
}
}
}