simple port?

how can I port this windows C++ code to QNX?
Thanks in advance.

void SetPriority(void)
HANDLE CurrentProcess;
HANDLE CurrentThread;
CurrentProcess = GetCurrentProcess();
CurrentThread = GetCurrentThread();
SetPriorityClass(CurrentProcess, HIGH_PRIORITY_CLASS);
SetThreadPriority(CurrentThread, THREAD_PRIORITY_IDLE);

void SetPriority(void) 
int policy;
struct sched_param param;

setprio(getpid(), HIGH_PRIORITY_CLASS);  // Set priority of the process
pthread_getschedparam(pthread_self(), &policy, &param);  
param.sched_priority = THREAD_PRIORITY_IDLE;
pthread_setschedparam(pthread_self(), policy, &param);  // 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().