1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" Portions extracted from linux/kernel/ioport.c (no copyright notice).
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" Modified Tue Aug 1 16:47 1995 by Jochen Karrer
7 .\" <cip307@cip.physik.uni-wuerzburg.de>
8 .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
9 .\" Modified Fri Nov 27 14:50:36 CET 1998 by Andries Brouwer <aeb@cwi.nl>
10 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
11 .\" Added notes on capability requirements
13 .TH IOPL 2 2022-09-09 "Linux man-pages (unreleased)"
15 iopl \- change I/O privilege level
18 .RI ( libc ", " \-lc )
21 .B #include <sys/io.h>
23 .BI "[[deprecated]] int iopl(int " level );
27 changes the I/O privilege level of the calling thread,
28 as specified by the two least significant bits in
31 The I/O privilege level for a normal thread is 0.
32 Permissions are inherited from parents to children.
34 This call is deprecated, is significantly slower than
36 and is only provided for older X servers which require
37 access to all 65536 I/O ports.
38 It is mostly for the i386 architecture.
39 On many other architectures it does not exist or will always
42 On success, zero is returned.
43 On error, \-1 is returned, and
45 is set to indicate the error.
53 This call is unimplemented.
56 The calling thread has insufficient privilege to call
60 capability is required to raise the I/O privilege level
61 above its current value.
64 is Linux-specific and should not be used in programs that are
65 intended to be portable.
67 .\" Libc5 treats it as a system call and has a prototype in
69 .\" Glibc1 does not have a prototype.
70 Glibc2 has a prototype both in
74 Avoid the latter, it is available on i386 only.
78 allowed the thread to disable interrupts while running
79 at a higher I/O privilege level.
80 This will probably crash the system, and is not recommended.
83 on some architectures (such as i386), permissions
85 inherited by the child produced by
87 and were preserved across
89 This behavior was inadvertently changed in Linux 3.7,
90 and won't be reinstated.