Consolidate stack-size and priority of rt-threads

This commit is contained in:
Robin Gareus 2020-04-23 01:28:58 +02:00
parent 485ac45477
commit 3d166c7789
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
13 changed files with 36 additions and 34 deletions

View file

@ -847,14 +847,13 @@ CoreAudioBackend::create_process_thread (boost::function<void()> func)
{
pthread_t thread_id;
pthread_attr_t attr;
size_t stacksize = 100000;
ThreadData* td = new ThreadData (this, func, stacksize);
ThreadData* td = new ThreadData (this, func, PBD_RT_STACKSIZE_PROC);
if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -22, stacksize,
if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_PROC, PBD_RT_STACKSIZE_PROC,
&thread_id, coreaudio_process_thread, td)) {
pthread_attr_init (&attr);
pthread_attr_setstacksize (&attr, stacksize);
pthread_attr_setstacksize (&attr, PBD_RT_STACKSIZE_PROC);
if (pthread_create (&thread_id, &attr, coreaudio_process_thread, td)) {
PBD::error << _("AudioEngine: cannot create process thread.") << endmsg;
pthread_attr_destroy (&attr);