]>
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 | .\" | |
5fbde956 | 5 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
fea681da MK |
6 | .\" |
7 | .\" Modified 21 Aug 1994 by Michael Chastain <mec@shell.portal.com>: | |
8 | .\" Added text about calling restriction (new in kernel 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 <esr@thyrsus.com> | |
11 | .\" " | |
45186a5d | 12 | .TH IDLE 2 2021-03-22 "Linux man-pages (unreleased)" |
fea681da MK |
13 | .SH NAME |
14 | idle \- make process 0 idle | |
15 | .SH SYNOPSIS | |
c7db92b9 | 16 | .nf |
fea681da | 17 | .B #include <unistd.h> |
68e4db0a | 18 | .PP |
fea681da | 19 | .B int idle(void); |
c7db92b9 | 20 | .fi |
fea681da | 21 | .SH DESCRIPTION |
e511ffb6 | 22 | .BR idle () |
fea681da MK |
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. | |
e511ffb6 | 26 | .BR idle () |
fea681da MK |
27 | never returns. |
28 | .PP | |
29 | Only process 0 may call | |
e511ffb6 | 30 | .BR idle (). |
2c8d1c7d | 31 | Any user process, even a process with superuser permission, |
fea681da MK |
32 | will receive |
33 | .BR EPERM . | |
47297adb | 34 | .SH RETURN VALUE |
e511ffb6 | 35 | .BR idle () |
fea681da MK |
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. | |
a622ed8f | 41 | .SH VERSIONS |
1afb4283 | 42 | Since Linux 2.3.13, this system call does not exist anymore. |
3113c7f3 | 43 | .SH STANDARDS |
8382f16d | 44 | This function is Linux-specific, and should not be used in programs |
fea681da | 45 | intended to be portable. |