diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-06-05 09:10:52 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-06-05 09:10:52 +0200 |
commit | c9ea7fb88809d935f3eaeee108415ff5abd17ead (patch) | |
tree | c5dbadc0c2a391830b32d965a7f9e225bd70d684 /src/DabMod.cpp | |
parent | e3cc55d32281be5dd7b7017d6dfed42be24d3cda (diff) | |
download | dabmod-c9ea7fb88809d935f3eaeee108415ff5abd17ead.tar.gz dabmod-c9ea7fb88809d935f3eaeee108415ff5abd17ead.tar.bz2 dabmod-c9ea7fb88809d935f3eaeee108415ff5abd17ead.zip |
Set priorities for modulator and UHD threads
Diffstat (limited to 'src/DabMod.cpp')
-rw-r--r-- | src/DabMod.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 2fe8d53..57f03b9 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -768,6 +768,15 @@ int launch_modulator(int argc, char* argv[]) } #endif + // Set thread priority to realtime + const int policy = SCHED_RR; + sched_param sp; + sp.sched_priority = sched_get_priority_min(policy); + int thread_prio_ret = pthread_setschedparam(pthread_self(), policy, &sp); + if (thread_prio_ret != 0) { + etiLog.level(error) << "Could not set priority for Modulator thread:" << thread_prio_ret; + } + while (run_again) { Flowgraph flowgraph; |