repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
secondary cache feature in vm.
[minix.git]
/
lib
/
libc
/
posix
/
nice.c
blob
4f750f926cbb70bd0a6440e2ca61976284f8591a
1
/*
2
nice.c
3
*/
4
5
#include <errno.h>
6
#include <unistd.h>
7
#include <sys/resource.h>
8
9
int
nice
(
incr
)
10
int
incr
;
11
{
12
int
r
;
13
14
errno
=
0
;
15
r
=
getpriority
(
PRIO_PROCESS
,
0
);
16
if
(
r
== -
1
&&
errno
!=
0
)
17
return
r
;
18
return
setpriority
(
PRIO_PROCESS
,
0
,
r
+
incr
);
19
}