OSDN Git Service

938662fa13ac683db01d1691298e0aca6f7e5829
[linuxjm/LDP_man-pages.git] / draft / man2 / iopl.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
4 .\" Portions extracted from linux/kernel/ioport.c (no copyright notice).
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
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 .\" Japanese Version Copyright (c) 1997 HORIMOTO Masafumi
34 .\"         all rights reserved.
35 .\" Translated 1997-09-29, HORIMOTO Masafumi
36 .\" Modified 1999-04-03, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
37 .\" Updated 2003-10-12, Kentaro Shirakata <argrath@ub32.org>
38 .\" Updated 2005-02-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\"
40 .TH IOPL 2 2004-05-27 "Linux" "Linux Programmer's Manual"
41 .\"O .SH NAME
42 .SH 名前
43 .\"O iopl \- change I/O privilege level
44 iopl \- I/O 特権レベルを変更する
45 .\"O .SH SYNOPSIS
46 .SH 書式
47 .B #include <sys/io.h>
48 .sp
49 .BI "int iopl(int " level );
50 .\"O .SH DESCRIPTION
51 .SH 説明
52 .\"O .BR iopl ()
53 .\"O changes the I/O privilege level of the calling process, as specified in
54 .\"O .IR level .
55 .BR iopl ()
56 は呼び出し元のプロセスの I/O 特権レベルを
57 .I level
58 で指定した値に変更する。
59
60 .\"O This call is necessary to allow 8514-compatible X servers to run under
61 .\"O Linux.
62 .\"O Since these X servers require access to all 65536 I/O ports, the
63 .\"O .BR ioperm (2)
64 .\"O call is not sufficient.
65 この関数は 8514 互換の X サーバを Linux で動作させるために必要である。
66 なぜならこの X サーバは 65536 個の I/O ポート全てへのアクセスを要求するので
67 .BR ioperm (2)
68 関数では不十分だからである。
69
70 .\"O In addition to granting unrestricted I/O port access, running at a higher
71 .\"O I/O privilege level also allows the process to disable interrupts.
72 .\"O This will probably crash the system, and is not recommended.
73 より高い I/O 特権レベルでの動作をさせることによって
74 I/O ポートアクセスの制限を解除することに加えて、プロセスが割り込みを
75 無効にすることもできるようになる。この機能は時としてシステムの破壊を
76 もたらすので勧められない。
77
78 .\"O Permissions are inherited by
79 .\"O .BR fork (2)
80 .\"O and
81 .\"O .BR exec (2).
82 .BR fork (2)
83
84 .BR exec (2)
85 を行った場合、特権は継承される。
86
87 .\"O The I/O privilege level for a normal process is 0.
88 通常のプロセスの I/O 特権レベルは 0 である。
89
90 .\"O This call is mostly for the i386 architecture.
91 .\"O On many other architectures it does not exist or will always
92 .\"O return an error.
93 このシステムコールはほとんど i386 アーキテクチャのためだけのものである。
94 その他の多くのアーキテクチャでは存在しないか、常にエラーを返す。
95 .\"O .SH "RETURN VALUE"
96 .SH 返り値
97 .\"O On success, zero is returned.
98 .\"O On error, \-1 is returned, and
99 .\"O .I errno
100 .\"O is set appropriately.
101 成功した場合には 0 を返す。エラーの場合には \-1 を返し、
102 .I errno
103 に適切な値が設定される。
104 .\"O .SH ERRORS
105 .SH エラー
106 .TP
107 .B EINVAL
108 .\"O .I level
109 .\"O is greater than 3.
110 引き数
111 .I level
112 が 3 より大きい。
113 .TP
114 .B ENOSYS
115 .\"O This call is unimplemented.
116 このシステムコールは実装されていない。
117 .\"O .TP
118 .\"O .B EPERM
119 .\"O The calling process has insufficient privilege to call
120 .\"O .BR iopl ();
121 .\"O the
122 .\"O .B CAP_SYS_RAWIO
123 .\"O capability is required.
124 呼び出し元プロセスに
125 .BR iopl ()
126 を呼び出すのに十分な権限がなかった。
127 .BR iopl ()
128 を呼び出すには
129 .B CAP_SYS_RAWIO
130 ケーパビリティが必要である。
131 .\"O .SH "CONFORMING TO"
132 .SH 準拠
133 .\"O .BR iopl ()
134 .\"O is Linux-specific and should not be used in processes
135 .\"O intended to be portable.
136 .BR iopl ()
137 は Linux 特有の関数であり、移植を意図したプログラムで
138 使用してはならない。
139 .\"O .SH NOTES
140 .SH 注意
141 .\"O Libc5 treats it as a system call and has a prototype in
142 .\"O .IR <unistd.h> .
143 .\"O Glibc1 does not have a prototype.
144 .\"O Glibc2 has a prototype both in
145 .\"O .I <sys/io.h>
146 .\"O and in
147 .\"O .IR <sys/perm.h> .
148 .\"O Avoid the latter, it is available on i386 only.
149 libc5 ではシステムコールとして扱い
150 .I <unistd.h>
151 にプロトタイプが存在している。
152 glibc1 にはプロトタイプは存在していない。
153 glibc2 は
154 .I <sys/io.h>
155
156 .I <sys/perm.h>
157 の両方にプロトタイプを持っている。
158 後者は i386 のみで利用可能なので、使用すべきではない。
159 .\"O .SH "SEE ALSO"
160 .SH 関連項目
161 .BR ioperm (2),
162 .BR capabilities (7)