]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/idle.2
intro.1, _exit.2, access.2, alarm.2, alloc_hugepages.2, arch_prctl.2, bind.2, chdir...
[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.\"
4b72fb64 5.\" %%%LICENSE_START(verbatim)
fea681da
MK
6.\" Permission is granted to make and distribute verbatim copies of this
7.\" manual provided the copyright notice and this permission notice are
8.\" preserved on all copies.
9.\"
10.\" Permission is granted to copy and distribute modified versions of this
11.\" manual under the conditions for verbatim copying, provided that the
12.\" entire resulting derived work is distributed under the terms of a
13.\" permission notice identical to this one.
c13182ef 14.\"
fea681da
MK
15.\" Since the Linux kernel and libraries are constantly changing, this
16.\" manual page may be incorrect or out-of-date. The author(s) assume no
17.\" responsibility for errors or omissions, or for damages resulting from
18.\" the use of the information contained herein. The author(s) may not
19.\" have taken the same level of care in the production of this manual,
20.\" which is licensed free of charge, as they might when working
21.\" professionally.
c13182ef 22.\"
fea681da
MK
23.\" Formatted or processed versions of this manual, if unaccompanied by
24.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 25.\" %%%LICENSE_END
fea681da
MK
26.\"
27.\" Modified 21 Aug 1994 by Michael Chastain <mec@shell.portal.com>:
28.\" Added text about calling restriction (new in kernel 1.1.20 I believe).
29.\" N.B. calling "idle" from user process used to hang process!
30.\" Modified Thu Oct 31 14:41:15 1996 by Eric S. Raymond <esr@thyrsus.com>
31.\" "
1330fa29 32.TH IDLE 2 2012-12-31 "Linux" "Linux Programmer's Manual"
fea681da
MK
33.SH NAME
34idle \- make process 0 idle
35.SH SYNOPSIS
36.B #include <unistd.h>
37.sp
38.B int idle(void);
39.SH DESCRIPTION
e511ffb6 40.BR idle ()
fea681da
MK
41is an internal system call used during bootstrap.
42It marks the process's pages as swappable, lowers its priority,
43and enters the main scheduling loop.
e511ffb6 44.BR idle ()
fea681da
MK
45never returns.
46.PP
47Only process 0 may call
e511ffb6 48.BR idle ().
2c8d1c7d 49Any user process, even a process with superuser permission,
fea681da
MK
50will receive
51.BR EPERM .
47297adb 52.SH RETURN VALUE
e511ffb6 53.BR idle ()
fea681da
MK
54never returns for process 0, and always returns \-1 for a user process.
55.SH ERRORS
56.TP
57.B EPERM
58Always, for a user process.
a622ed8f 59.SH VERSIONS
1afb4283 60Since Linux 2.3.13, this system call does not exist anymore.
47297adb 61.SH CONFORMING TO
8382f16d 62This function is Linux-specific, and should not be used in programs
fea681da 63intended to be portable.