| 21 |
|
#include "rtprocess.h" |
| 22 |
|
|
| 23 |
|
|
| 24 |
< |
/* Looks like some Windows versions use negative PIDs. |
| 25 |
< |
Let's just hope they either make them *all* negative, or none. */ |
| 26 |
< |
static int system_uses_negative_pids = 0; |
| 24 |
> |
int |
| 25 |
> |
win_nice(int inc) /* simple nice(2) replacement for Windows */ |
| 26 |
> |
{ |
| 27 |
> |
/* We don't have much granularity available: IDLE_PRIORITY_CLASS |
| 28 |
> |
will run whenever no other higher priority process is running */ |
| 29 |
> |
if (inc > 0) { |
| 30 |
> |
return (int)!SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS); |
| 31 |
> |
} |
| 32 |
> |
return 0; |
| 33 |
> |
} |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
/* |