Remove crufty statement that this system call is not implemented.

The nice interval can be used to control the size of the round-robin
quantum.
This commit is contained in:
Michael Kerrisk 2007-04-05 14:37:59 +00:00
parent 2795ac0be9
commit 273691af91
1 changed files with 24 additions and 11 deletions

View File

@ -27,9 +27,9 @@
.\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de> .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
.\" revision .\" revision
.\" .\"
.TH RR_GET_INTERVAL 2 1996-04-10 "Linux 1.3.81" "Linux Programmer's Manual" .TH SCHED_RR_GET_INTERVAL 2 2007-04-06 "Linux 2.6.19" "Linux Programmer's Manual"
.SH NAME .SH NAME
sched_rr_get_interval \- get the SCHED_RR interval for the named process sched_rr_get_interval \- get the SCHED_RR interval for the named process
.SH SYNOPSIS .SH SYNOPSIS
.B #include <sched.h> .B #include <sched.h>
.sp .sp
@ -37,16 +37,18 @@ sched_rr_get_interval \- get the SCHED_RR interval for the named process
.SH DESCRIPTION .SH DESCRIPTION
.BR sched_rr_get_interval () .BR sched_rr_get_interval ()
writes into the \fItimespec\fR structure pointed to by \fItp\fR the writes into the \fItimespec\fR structure pointed to by \fItp\fR the
round robin time quantum for the process identified by \fIpid\fR. round-robin time quantum for the process identified by \fIpid\fR.
The \fItimespec\fR structure has the following form: The \fItimespec\fR structure has the following form:
.in +0.5i
.nf .nf
struct timespec { struct timespec {
time_t tv_sec; /* seconds */ time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */ long tv_nsec; /* nanoseconds */
}; };
.fi .fi
.in
If If
\fIpid\fR is zero, the time quantum for the calling process is written \fIpid\fR is zero, the time quantum for the calling process is written
@ -54,9 +56,9 @@ into *\fItp\fR. The identified process should be running under the
.I SCHED_RR .I SCHED_RR
scheduling policy. scheduling policy.
The round robin time quantum value is not alterable under Linux .\" The round-robin time quantum value is not alterable under Linux
1.3.81. .\" 1.3.81.
.\"
POSIX systems on which POSIX systems on which
.BR sched_rr_get_interval () .BR sched_rr_get_interval ()
is available define is available define
@ -78,16 +80,27 @@ Problem with copying information to userspace.
Invalid pid. Invalid pid.
.TP .TP
.B ENOSYS .B ENOSYS
The system call is not yet implemented. The system call is not yet implemented (only on rather old kernels).
.TP .TP
.B ESRCH .B ESRCH
The process whose ID is \fIpid\fR could not be found. The process whose ID is \fIpid\fR could not be found.
.SH "CONFORMING TO" .SH "CONFORMING TO"
POSIX.1-2001. POSIX.1-2001.
.SH BUGS .SH "LINUX NOTES"
As of Linux 1.3.81 \fBsched_rr_get_interval\fR() returns with error POSIX does not specify any mechanism for controlling the size of the
ENOSYS, because SCHED_RR has not yet been fully implemented and tested round-robin time quantum.
properly. However, Linux provides a (non-portable) method of doing this.
The quantum can be controlled by adjusting the process's nice value (see
.BR setpriority (2)).
Assigning a negative (i.e., high) nice value results in a longer quantum;
assigning a positive (i.e., low) nice value results in a shorter quantum.
The default quantum is 0.1 seconds;
the degree to which changing the nice value affects the
quantum has varied somewhat across kernel versions.
.\" .SH BUGS
.\" As of Linux 1.3.81 \fBsched_rr_get_interval\fR() returns with error
.\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
.\" properly.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR sched_setscheduler (2) .BR sched_setscheduler (2)
has a description of the Linux scheduling scheme. has a description of the Linux scheduling scheme.