chiark / gitweb /
[PATCH] added klibc version 0.82 (cvs tree) to the udev tree.
[elogind.git] / klibc / klibc / nice.c
1 /*
2  * nice.c
3  */
4
5 #include <unistd.h>
6 #include <sched.h>
7 #include <sys/resource.h>
8 #include <sys/syscall.h>
9
10 #ifdef __NR_nice
11
12 _syscall1(int,nice,int,inc);
13
14 #else
15
16 int nice(int inc)
17 {
18   pid_t me = getpid();
19   return setpriority(me, PRIO_PROCESS, getpriority(me, PRIO_PROCESS)+inc);
20 }
21
22 #endif