diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 4f55b07..22e5297 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -536,8 +536,20 @@ static bool calculateUnixPriority(int priority, int *sched_policy, int *sched_pr #endif const int highestPriority = QThread::TimeCriticalPriority; - int prio_min = sched_get_priority_min(*sched_policy); - int prio_max = sched_get_priority_max(*sched_policy); + int prio_min; + int prio_max; +#if defined(Q_OS_VXWORKS) && defined(VXWORKS_DKM) + // for other scheduling policies than SCHED_RR or SCHED_FIFO + prio_min = SCHED_FIFO_LOW_PRI; + prio_max = SCHED_FIFO_HIGH_PRI; + + if ((*sched_policy == SCHED_RR) || (*sched_policy == SCHED_FIFO)) +#endif + { + prio_min = sched_get_priority_min(*sched_policy); + prio_max = sched_get_priority_max(*sched_policy); + } + if (prio_min == -1 || prio_max == -1) return false; |