diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-29 20:35:36 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-29 20:35:36 +0200 |
commit | 467c801ce80b69abdb7efb4c23120532bed3fc96 (patch) | |
tree | e0ed5e4592819392a5f37d6a8c44003dd96daf0f /libs/backends/alsa | |
parent | df659e91f1ad8b5d71838abc130dce8eacdf7cc1 (diff) |
Abstract definition of rt-scheduler policy
pthread-w32 does not support pthread_setschedparam() with
SCHED_FIFO and bails out. While pthread_create() simply ignores the policy
and sets the priority regadless.
This only affects ctrl-surface event-loops & AutomationWatch on Windows.
Diffstat (limited to 'libs/backends/alsa')
-rw-r--r-- | libs/backends/alsa/alsa_audiobackend.cc | 4 | ||||
-rw-r--r-- | libs/backends/alsa/alsa_midi.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index 9f42145314..525ff2e757 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -992,7 +992,7 @@ AlsaAudioBackend::_start (bool for_latency_measurement) _run = true; _port_change_flag = false; - if (pbd_realtime_pthread_create (SCHED_FIFO, -20, 100000, + if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -20, 100000, &_main_thread, pthread_process, this)) { if (pthread_create (&_main_thread, NULL, pthread_process, this)) @@ -1129,7 +1129,7 @@ AlsaAudioBackend::create_process_thread (boost::function<void()> func) ThreadData* td = new ThreadData (this, func, stacksize); - if (pbd_realtime_pthread_create (SCHED_FIFO, -22, stacksize, + if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -22, stacksize, &thread_id, alsa_process_thread, td)) { pthread_attr_init (&attr); pthread_attr_setstacksize (&attr, stacksize); diff --git a/libs/backends/alsa/alsa_midi.cc b/libs/backends/alsa/alsa_midi.cc index 348586ad20..d593f73def 100644 --- a/libs/backends/alsa/alsa_midi.cc +++ b/libs/backends/alsa/alsa_midi.cc @@ -72,7 +72,7 @@ static void * pthread_process (void *arg) int AlsaMidiIO::start () { - if (pbd_realtime_pthread_create (SCHED_FIFO, -21, 100000, + if (pbd_realtime_pthread_create (PBD_SCHED_FIFO, -21, 100000, &_main_thread, pthread_process, this)) { if (pthread_create (&_main_thread, NULL, pthread_process, this)) { |