Annotation of /trunk/mkinitrd-magellan/klibc/usr/klibc/getpriority.c
Parent Directory | Revision Log
Revision 532 -
(hide annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 434 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 434 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | niro | 532 | /* |
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 |