]>
Commit | Line | Data |
---|---|---|
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 |
34 | idle \- 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 |
41 | is an internal system call used during bootstrap. |
42 | It marks the process's pages as swappable, lowers its priority, | |
43 | and enters the main scheduling loop. | |
e511ffb6 | 44 | .BR idle () |
fea681da MK |
45 | never returns. |
46 | .PP | |
47 | Only process 0 may call | |
e511ffb6 | 48 | .BR idle (). |
2c8d1c7d | 49 | Any user process, even a process with superuser permission, |
fea681da MK |
50 | will receive |
51 | .BR EPERM . | |
47297adb | 52 | .SH RETURN VALUE |
e511ffb6 | 53 | .BR idle () |
fea681da MK |
54 | never returns for process 0, and always returns \-1 for a user process. |
55 | .SH ERRORS | |
56 | .TP | |
57 | .B EPERM | |
58 | Always, for a user process. | |
a622ed8f | 59 | .SH VERSIONS |
1afb4283 | 60 | Since Linux 2.3.13, this system call does not exist anymore. |
47297adb | 61 | .SH CONFORMING TO |
8382f16d | 62 | This function is Linux-specific, and should not be used in programs |
fea681da | 63 | intended to be portable. |