Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #include <sys/resource.h> |
2 | #include "syscall.h" | ||||
3 | |||||
4 | int getpriority(int which, id_t who) | ||||
5 | { | ||||
Rich Felker | aa398f5 | 2011-03-20 00:16:43 -0400 | [diff] [blame] | 6 | int ret = syscall(SYS_getpriority, which, who); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 7 | if (ret < 0) return ret; |
8 | return 20-ret; | ||||
9 | } |