chiark / gitweb /
[PATCH] update klibc to version 0.181
[elogind.git] / klibc / klibc / getpriority.c
1 /*
2  * getpriority.c
3  *
4  * Needs to do some post-syscall mangling to distinguish error returns...
5  * but only on some platforms.  Sigh.
6  */
7
8 #include <unistd.h>
9 #include <sys/time.h>
10 #include <sys/resource.h>
11 #include <sys/syscall.h>
12
13 #if !defined(__alpha__) && !defined(__ia64__)
14
15 extern int __getpriority(int, int);
16
17 int getpriority(int which, int who)
18 {
19   int rv = __getpriority(which, who);
20   return ( rv < 0 ) ? rv : 20-rv;
21 }
22
23 #endif