musl/src/unistd/nice.c

13 lines
226 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include <unistd.h>
#include <sys/resource.h>
2011-02-12 00:22:29 -05:00
#include "syscall.h"
int nice(int inc)
{
#ifdef __NR_nice
2011-02-12 00:22:29 -05:00
return syscall1(__NR_nice, inc);
#else
return setpriority(PRIO_PROCESS, 0, getpriority(PRIO_PROCESS, 0)+inc);
#endif
2011-02-12 00:22:29 -05:00
}