Debian Codegraph @

upstream/debian-trixie/man2/idle.2

raw
1 .\" Copyright 1993 Rickard E. Faith ([email protected])
2 .\" Portions extracted from linux/mm/swap.c:
3 .\" Copyright (C) 1991, 1992 Linus Torvalds
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .\" Modified 21 Aug 1994 by Michael Chastain <[email protected]>:
8 .\" Added text about calling restriction (new in Linux 1.1.20 I believe).
9 .\" N.B. calling "idle" from user process used to hang process!
10 .\" Modified Thu Oct 31 14:41:15 1996 by Eric S. Raymond <[email protected]>
11 .\" "
12 .TH idle 2 2024-05-02 "Linux man-pages 6.9.1"
13 .SH NAME
14 idle \- make process 0 idle
15 .SH SYNOPSIS
16 .nf
17 .B #include <unistd.h>
18 .P
19 .B [[deprecated]] int idle(void);
20 .fi
21 .SH DESCRIPTION
22 .BR idle ()
23 is an internal system call used during bootstrap.
24 It marks the process's pages as swappable, lowers its priority,
25 and enters the main scheduling loop.
26 .BR idle ()
27 never returns.
28 .P
29 Only process 0 may call
30 .BR idle ().
31 Any user process, even a process with superuser permission,
32 will receive
33 .BR EPERM .
34 .SH RETURN VALUE
35 .BR idle ()
36 never returns for process 0, and always returns \-1 for a user process.
37 .SH ERRORS
38 .TP
39 .B EPERM
40 Always, for a user process.
41 .SH STANDARDS
42 Linux.
43 .SH HISTORY
44 Removed in Linux 2.3.13.