From: terminatorX <> Date: Thu, 10 Apr 2008 11:14:10 +0000 (+0000) Subject: Check for minimum priority. X-Git-Tag: RELEASE_3_90~51 X-Git-Url: https://lisas.de/git/?p=terminatorX.git;a=commitdiff_plain;h=0c18ee03420efa79160effa228bf40bdf833352e Check for minimum priority. --- diff --git a/.cproject b/.cproject new file mode 100644 index 0000000..6cd2c6d --- /dev/null +++ b/.cproject @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +make + +all +false +true + + + + + + + + + + + + + diff --git a/src/tX_engine.cc b/src/tX_engine.cc index 2b5cca2..ad88f3a 100644 --- a/src/tX_engine.cc +++ b/src/tX_engine.cc @@ -190,7 +190,8 @@ void *engine_thread_entry(void *engine_void) { if (pthread_setschedparam(pthread_self(), SCHED_FIFO, &parm)) { // we failed to get max prio, let see whether we can get a little less bool success = false; - for (int i = parm.__sched_priority; i >= 0; i--) { + + for (int i = parm.__sched_priority; i >= sched_get_priority_min(SCHED_FIFO); i--) { parm.__sched_priority = i; if (!pthread_setschedparam(pthread_self(), SCHED_FIFO, &parm)) {