OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / idle.2
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 .\"
5 .\" %%%LICENSE_START(VERBATIM)
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.
14 .\"
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.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
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 .\" "
32 .TH IDLE 2 2012-12-31 "Linux" "Linux Programmer's Manual"
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
40 .BR idle ()
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.
44 .BR idle ()
45 never returns.
46 .PP
47 Only process 0 may call
48 .BR idle ().
49 Any user process, even a process with superuser permission,
50 will receive
51 .BR EPERM .
52 .SH RETURN VALUE
53 .BR idle ()
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.
59 .SH VERSIONS
60 Since Linux 2.3.13, this system call does not exist anymore.
61 .SH CONFORMING TO
62 This function is Linux-specific, and should not be used in programs
63 intended to be portable.
64 .SH COLOPHON
65 This page is part of release 3.79 of the Linux
66 .I man-pages
67 project.
68 A description of the project,
69 information about reporting bugs,
70 and the latest version of this page,
71 can be found at
72 \%http://www.kernel.org/doc/man\-pages/.