4 * Needs to do some post-syscall mangling to distinguish error returns...
5 * but only on some platforms. Sigh.
10 #include <sys/resource.h>
11 #include <sys/syscall.h>
13 #define __NR__getpriority __NR_getpriority
15 static inline _syscall2(int,_getpriority,int,which,int,who);
17 int getpriority(int which, int who)
19 #if defined(__alpha__) || defined(__ia64__)
20 return _getpriority(which, who);
22 int rv = _getpriority(which, who);
23 return ( rv < 0 ) ? rv : 20-rv;