OSDN Git Service

d7b5952a0502ca0e88ed8fba892eacae2353a18a
[linuxjm/LDP_man-pages.git] / draft / man2 / iopl.2
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" Portions extracted from linux/kernel/ioport.c (no copyright notice).
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .\" Modified Tue Aug  1 16:47    1995 by Jochen Karrer
27 .\"                              <cip307@cip.physik.uni-wuerzburg.de>
28 .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
29 .\" Modified Fri Nov 27 14:50:36 CET 1998 by Andries Brouwer <aeb@cwi.nl>
30 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
31 .\"     Added notes on capability requirements
32 .\"
33 .\"*******************************************************************
34 .\"
35 .\" This file was generated with po4a. Translate the source file.
36 .\"
37 .\"*******************************************************************
38 .TH IOPL 2 2013\-03\-15 Linux "Linux Programmer's Manual"
39 .SH 名前
40 iopl \- I/O 特権レベルを変更する
41 .SH 書式
42 \fB#include <sys/io.h>\fP
43 .sp
44 \fBint iopl(int \fP\fIlevel\fP\fB);\fP
45 .SH 説明
46 \fBiopl\fP()  は呼び出し元のプロセスの I/O 特権レベルを \fIlevel\fP の下位 2 ビットで指定した値に変更する。
47
48 この関数は 8514 互換の X サーバを Linux で動作させるために必要である。 なぜならこの X サーバは 65536 個の I/O
49 ポート全てへのアクセスを要求するので \fBioperm\fP(2)  関数では不十分だからである。
50
51 より高い I/O 特権レベルでの動作をさせることによって I/O ポートアクセスの制限を解除することに加えて、プロセスが割り込みを
52 無効にすることもできるようになる。この機能は時としてシステムの破壊を もたらすので勧められない。
53
54 \fBfork\fP(2)  や \fBexec\fP(2)  を行った場合、特権は継承される。
55
56 通常のプロセスの I/O 特権レベルは 0 である。
57
58 このシステムコールはほとんど i386 アーキテクチャのためだけのものである。 その他の多くのアーキテクチャでは存在しないか、常にエラーを返す。
59 .SH 返り値
60 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
61 .SH エラー
62 .TP 
63 \fBEINVAL\fP
64 引き数 \fIlevel\fP が 3 より大きい。
65 .TP 
66 \fBENOSYS\fP
67 このシステムコールは実装されていない。
68 .TP 
69 \fBEPERM\fP
70 呼び出し元プロセスに \fBiopl\fP()  を呼び出すのに十分な権限がなかった。 I/O 特権レベルを現在の値より上げるには
71 \fBCAP_SYS_RAWIO\fP ケーパビリティが必要である。
72 .SH 準拠
73 \fBipc\fP()  は Linux 特有であり、 移植を意図したプログラムでは 使用してはいけない。
74 .SH 注意
75 libc5 ではシステムコールとして扱い \fI<unistd.h>\fP にプロトタイプが存在している。 glibc1
76 にはプロトタイプは存在していない。 glibc2 は \fI<sys/io.h>\fP と \fI<sys/perm.h>\fP
77 の両方にプロトタイプを持っている。 後者は i386 のみで利用可能なので、使用すべきではない。
78 .SH 関連項目
79 \fBioperm\fP(2), \fBoutb\fP(2), \fBcapabilities\fP(7)
80 .SH この文書について
81 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
82 である。プロジェクトの説明とバグ報告に関する情報は
83 http://www.kernel.org/doc/man\-pages/ に書かれている。