QThread priority on Embedded Linux
-
I have written an application with a main thread (GUI) and some worker threads for an embedded linux device.
Since not all threads need to have the same priority, I want to change the priority for those threads that are more critical than others.On windows I would set the priority with Thread->start(QThread::LowPriority); , but this isn't possible on linux according to the documentation. They refer to "sched_setscheduler":http://linux.die.net/man/2/sched_setscheduler, but it seems this is the linux scheduling policy for an entire process and not for threads seperately. If that's the case, wouldn't the nice command be an option too?
Or am I just wrong? Is it possible to set thread priorities in linux? Maybe after patching to RT kernel?
Thanks