Leave a note for RT-Tasklists (need macOS workgroups)

This commit is contained in:
Robin Gareus 2022-06-03 21:41:04 +02:00
parent 99e785541a
commit 191fdfda72
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -67,12 +67,19 @@ RTTaskList::drop_threads ()
RTTaskList::_thread_run (void* arg)
{
RTTaskList* d = static_cast<RTTaskList*> (arg);
pbd_mach_set_realtime_policy (pthread_self (), 5. * 1e-5, false);
char name[64];
snprintf (name, 64, "RTTask-%p", (void*)DEBUG_THREAD_SELF);
pthread_set_name (name);
/* TODO: join macOS workgroup (needs backend API update).
* also rt-tasks need to be re-initialized when the engine is restarted
*/
d->run ();
// TODO: leave macOS workgroup
pthread_exit (0);
return 0;
}
@ -101,7 +108,6 @@ RTTaskList::reset_thread_list ()
PBD::fatal << _("Cannot create thread for TaskList!") << " (" << strerror (rv) << ")" << endmsg;
/* NOT REACHED */
}
pbd_mach_set_realtime_policy (thread_id, 5. * 1e-5, false);
_threads.push_back (thread_id);
}
}