<p>On Windows I can do:</p>

<pre><code>HANDLE hCurrentProcess = GetCurrentProcess();

SetPriorityClass(hCurrentProcess, ABOVE_NORMAL_PRIORITY_CLASS);
</code></pre>

<p>How can I do the same thing on *nix?</p>

Try:
```
```
#include <sys/time.h>
#include <sys/resource.h>

int main(){
    setpriority(PRIO_PROCESS, 0, -20);
}
```
```
Note that you must be running as superuser for this to work.
(for more info, type 'man setpriority' at a prompt.)