mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Consolidate stack-size and priority of rt-threads
This commit is contained in:
parent
485ac45477
commit
3d166c7789
13 changed files with 36 additions and 34 deletions
|
|
@ -628,7 +628,7 @@ PulseAudioBackend::_start (bool /*for_latency_measurement*/)
|
|||
_run = true;
|
||||
_port_change_flag = false;
|
||||
|
||||
if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -20, 100000,
|
||||
if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, PBD_RT_PRI_MAIN, PBD_RT_STACKSIZE_PROC,
|
||||
&_main_thread, pthread_process, this)) {
|
||||
if (pthread_create (&_main_thread, NULL, pthread_process, this)) {
|
||||
PBD::error << _("PulseAudioBackend: failed to create process thread.") << endmsg;
|
||||
|
|
@ -744,14 +744,13 @@ PulseAudioBackend::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, pulse_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, pulse_process_thread, td)) {
|
||||
PBD::error << _("AudioEngine: cannot create process thread.") << endmsg;
|
||||
pthread_attr_destroy (&attr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue