diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-17 14:16:55 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-17 14:44:25 (GMT) |
commit | f3405a516ac30fc7dee1021cc6f34ca03dd08d97 (patch) | |
tree | 6cadc0c7591af83109a17f55413a75cf01a9f012 /src/corelib/thread/qthread.cpp | |
parent | fb6cfbe48bc4f2148062d50d4df95616e06f9324 (diff) | |
download | Qt-f3405a516ac30fc7dee1021cc6f34ca03dd08d97.zip Qt-f3405a516ac30fc7dee1021cc6f34ca03dd08d97.tar.gz Qt-f3405a516ac30fc7dee1021cc6f34ca03dd08d97.tar.bz2 |
Implement Idle-priority threads for Linux.
I don't know of any other systems that define SCHED_IDLE, but if any
do, they'll use this code too
Task-number: related to QTBUG-9032
Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r-- | src/corelib/thread/qthread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index dd0c257..cb84538 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -617,7 +617,9 @@ QThread::Priority QThread::priority() const { Q_D(const QThread); QMutexLocker locker(&d->mutex); - return d->priority; + + // mask off the high bits that are used for flags + return Priority(d->priority & 0xffff); } /*! |