struct sched_param param;
setprio(getpid(), HIGH_PRIORITY_CLASS); // Set priority of the process
pthread_getschedparam(pthread_self(), &policy, ¶m);
param.sched_priority = THREAD_PRIORITY_IDLE;
pthread_setschedparam(pthread_self(), policy, ¶m); // Set priority of the thread
It`s not exacly that. Priorities under Windows work differently then under QNX. Under windows a process gets a class, which means priorities of process will float between a certain range. A thread can be given offset to the base class.
QNX doesn`t have that feature, there are just thread priorities. setprio() can be use to set the priority of another process thread 1 or for the thread that makes the calls to setprio().