summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorRitt Konstantin <qnx@ics.com>2011-06-21 13:51:04 +0200
committerHarald Fernengel <harald.fernengel@nokia.com>2011-06-21 14:05:38 +0200
commit648bf773b1aa759a40d8609039c44f9dce31da61 (patch)
tree6d0e09b8f1a9012504d000a95eb1fc4dc69055fb /src/corelib/thread
parentf60789de3be437ce0fbe16430467adfd6fe66cc7 (diff)
use RoundRobin scheduler by default on QNX
otherwise drawn intensive apps will hog the cpu and make the system appear frozen Merge-request: 1259 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_unix.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 839a396ac1..765969efd9 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -479,6 +479,11 @@ void QThread::usleep(unsigned long usecs)
// sched_priority is OUT only
static bool calculateUnixPriority(int priority, int *sched_policy, int *sched_priority)
{
+#ifdef Q_OS_QNX
+ // without Round Robin drawn intensive apps will hog the cpu
+ // and make the system appear frozen
+ *sched_policy = SCHED_RR;
+#endif
#ifdef SCHED_IDLE
if (priority == QThread::IdlePriority) {
*sched_policy = SCHED_IDLE;