Fix IO Thread priority

This adds `pbd_pthread_priority` indirection to correctly get
the absolute thread priority.

and for consistency a 4 letter enum is used.
This commit is contained in:
Robin Gareus 2024-10-11 10:06:49 +02:00
parent 5efa5b4529
commit 0aff098541
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 5 additions and 4 deletions

View file

@ -348,7 +348,7 @@ pbd_pthread_priority (PBDThreadClass which)
case THREAD_CTRL:
default:
return -14; // THREAD_PRIORITY_HIGHEST (2)
case THREAD_IO:
case THREAD_IOFX:
/* https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-libraries/winpthreads/src/sched.c */
return -15; // THREAD_PRIORITY_ABOVE_NORMAL (1)
}
@ -372,7 +372,7 @@ pbd_pthread_priority (PBDThreadClass which)
return base - 2;
case THREAD_CTRL:
return base - 3;
case THREAD_IO:
case THREAD_IOFX:
return base - 10;
}
#endif