aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2019-07-30 19:04:46 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2019-07-30 19:04:46 +0200
commitceebfcd81dd50b3f4e6b5b7f2195248fd69f5578 (patch)
tree7437f99ebf33dc1992985629387547eb1e4d7370
parent5f6197a33a8ef5b14dde93aabaf5666abff99be4 (diff)
downloadsynthpod-ceebfcd81dd50b3f4e6b5b7f2195248fd69f5578.tar.xz
sbox: explicitely set default schedule priority.
Needed when synthpod_sandbox_x11 is started via NSM after synthpod_bin's worker thread priotity has been set (inheritence).
-rw-r--r--VERSION2
-rw-r--r--sandbox_ui.lv2/sandbox_slave.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/VERSION b/VERSION
index a7eccabe..e71c74c6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.6055
+0.1.6057
diff --git a/sandbox_ui.lv2/sandbox_slave.c b/sandbox_ui.lv2/sandbox_slave.c
index a65940eb..90b72c9f 100644
--- a/sandbox_ui.lv2/sandbox_slave.c
+++ b/sandbox_ui.lv2/sandbox_slave.c
@@ -22,6 +22,7 @@
#include <dlfcn.h>
#include <string.h>
#include <ctype.h>
+#include <pthread.h>
#include <sandbox_slave.h>
#include <sandbox_io.h>
@@ -427,6 +428,17 @@ sandbox_slave_new(int argc, char **argv, const sandbox_slave_driver_t *driver,
goto fail;
}
+ {
+ struct sched_param schedp;
+ memset(&schedp, 0, sizeof(struct sched_param));
+ schedp.sched_priority = 0; // the only valid value for SCHED_OTHER
+
+ if(pthread_setschedparam(pthread_self(), SCHED_OTHER, &schedp))
+ {
+ fprintf(stderr, "pthread_setschedparam error\n");
+ }
+ }
+
sb->driver = driver;
sb->data = data;