]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/idle.2
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man2 / idle.2
CommitLineData
fea681da
MK
1.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2.\" Portions extracted from linux/mm/swap.c:
3.\" Copyright (C) 1991, 1992 Linus Torvalds
4.\"
5fbde956 5.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da
MK
6.\"
7.\" Modified 21 Aug 1994 by Michael Chastain <mec@shell.portal.com>:
8.\" Added text about calling restriction (new in kernel 1.1.20 I believe).
9.\" N.B. calling "idle" from user process used to hang process!
10.\" Modified Thu Oct 31 14:41:15 1996 by Eric S. Raymond <esr@thyrsus.com>
11.\" "
45186a5d 12.TH IDLE 2 2021-03-22 "Linux man-pages (unreleased)"
fea681da
MK
13.SH NAME
14idle \- make process 0 idle
15.SH SYNOPSIS
c7db92b9 16.nf
fea681da 17.B #include <unistd.h>
68e4db0a 18.PP
fea681da 19.B int idle(void);
c7db92b9 20.fi
fea681da 21.SH DESCRIPTION
e511ffb6 22.BR idle ()
fea681da
MK
23is an internal system call used during bootstrap.
24It marks the process's pages as swappable, lowers its priority,
25and enters the main scheduling loop.
e511ffb6 26.BR idle ()
fea681da
MK
27never returns.
28.PP
29Only process 0 may call
e511ffb6 30.BR idle ().
2c8d1c7d 31Any user process, even a process with superuser permission,
fea681da
MK
32will receive
33.BR EPERM .
47297adb 34.SH RETURN VALUE
e511ffb6 35.BR idle ()
fea681da
MK
36never returns for process 0, and always returns \-1 for a user process.
37.SH ERRORS
38.TP
39.B EPERM
40Always, for a user process.
a622ed8f 41.SH VERSIONS
1afb4283 42Since Linux 2.3.13, this system call does not exist anymore.
3113c7f3 43.SH STANDARDS
8382f16d 44This function is Linux-specific, and should not be used in programs
fea681da 45intended to be portable.