From 2cdfb7ca26f46f151afbc23d5d94fc68597137f5 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 13 Feb 2011 22:45:42 -0500 Subject: cleaning up syscalls in preparation for x86_64 port - hide all the legacy xxxxxx32 name cruft in syscall.h so the actual source files can be clean and uniform across all archs. - cleanup llseek/lseek and mmap2/mmap handling for 32/64 bit systems - alternate implementation for nice if the target lacks nice syscall --- src/unistd/nice.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/unistd/nice.c') diff --git a/src/unistd/nice.c b/src/unistd/nice.c index 4b28ef41..f38db678 100644 --- a/src/unistd/nice.c +++ b/src/unistd/nice.c @@ -1,7 +1,12 @@ #include +#include #include "syscall.h" int nice(int inc) { +#ifdef __NR_nice return syscall1(__NR_nice, inc); +#else + return setpriority(PRIO_PROCESS, 0, getpriority(PRIO_PROCESS, 0)+inc); +#endif } -- cgit v1.2.1