OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man2 / idle.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
4 .\" Portions extracted from linux/mm/swap.c:
5 .\"                Copyright (C) 1991, 1992  Linus Torvalds
6 .\"
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
10 .\"
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
15 .\"
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein.  The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
22 .\" professionally.
23 .\"
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
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 1994-08-21 "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 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.