source: trunk/minix/man/man2/getpriority.2@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.2 KB
RevLine 
[9]1.TH GETPRIORITY 2 "Jul 1, 2005"
2.UC 4
3.SH NAME
4getpriority, setpriority \- get and set scheduling priority
5.SH SYNOPSIS
6.nf
7.ft B
8#include <sys/resource.h>
9
10int getpriority(int \fIwhich\fP, int \fIwho\fP)
11int setpriority(int \fIwhich\fP, int \fIwho\fP, int \fIprio\fP)
12.SH DESCRIPTION
13.B Getpriority
14returns the scheduling priority of the process, process group, or user
15referred to in \fIwho\fP. Which of the three is indicated in
16\fIwhich\fP, by PRIO_PROCESS, PRIO_PGRP and PRIO_USER, respectively.
17In MINIX 3, currently only PRIO_PROCESS is implemented.
18
19The range of the returned value is between PRIO_MIN and PRIO_MAX,
20currently between -20 and 20, and is the so-called nice value of
21a process. The higher the nice value, the less favourable the scheduling
22priority.
23
24.B Setpriority
25sets the priority indicated by \fIwho\fP and \fIwhich\fP to \fIprio\fP.
26\fIprio\fP, which is the nice value, may only be lowered by the super-user.
27.SH RETURN VALUES
28These functions both return -1 on failure, and set errno in this case.
29Because
30.B getpriority
31can return -1 as the real nice value, the caller has to reset errno
32and check errno afterwards to distinguish between an error condition
33and a negative nice value.
34.SH SEE ALSO
35nice(1)
36.SH AUTHOR
37Ben Gras <beng@few.vu.nl>
Note: See TracBrowser for help on using the repository browser.