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