OSDN Git Service

fd8ed9270d1c5189ac2152cb30e67c6c2620382f
[linuxjm/LDP_man-pages.git] / draft / man2 / outb.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1995 Paul Gortmaker
4 .\" (gpg109@rsphy1.anu.edu.au)
5 .\" Wed Nov 29 10:58:54 EST 1995
6 .\"
7 .\" This is free documentation; you can redistribute it and/or
8 .\" modify it under the terms of the GNU General Public License as
9 .\" published by the Free Software Foundation; either version 2 of
10 .\" the License, or (at your option) any later version.
11 .\"
12 .\" The GNU General Public License's references to "object code"
13 .\" and "executables" are to be interpreted as the output of any
14 .\" document formatting or typesetting system, including
15 .\" intermediate and printed output.
16 .\"
17 .\" This manual is distributed in the hope that it will be useful,
18 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 .\" GNU General Public License for more details.
21 .\"
22 .\" You should have received a copy of the GNU General Public
23 .\" License along with this manual; if not, write to the Free
24 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .\" USA.
26 .\"
27 .\" Japanese Version Copyright (c) 1996 HANATAKA Shinya
28 .\"         all rights reserved.
29 .\" Translated Wed Dec  4 15:19:14 JST 1996
30 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
31 .\" Updated Fri Dec 14 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
32 .\" Updated Sun May 23 JST 2004 by Kentaro Shirakata <argrath@ub32.org>
33 .\" Updated Thu Mar 24 JST 2005 by Kentaro Shirakata <argrath@ub32.org>
34 .\" Updated Thu Oct  9 JST 2005 by Kentaro Shirakata <argrath@ub32.org>
35 .\"
36 .\"WORD:        inline macro            インライン・マクロ
37 .\"WORD:        unresolved reference    解決できない参照
38 .\"WORD:        segmentation fault      セグメンテーション違反
39 .\"
40 .TH OUTB 2 1995-11-29 "Linux" "Linux Programmer's Manual"
41 .SH 名前
42 .\"O outb, outw, outl, outsb, outsw, outsl,
43 .\"O inb, inw, inl, insb, insw, insl,
44 .\"O outb_p, outw_p, outl_p, inb_p, inw_p, inl_p \- port I/O
45 outb, outw, outl, outsb, outsw, outsl,
46 inb, inw, inl, insb, insw, insl,
47 outb_p, outw_p, outl_p, inb_p, inw_p, inl_p \- ポート入出力
48 .SH 説明
49 .\"O This family of functions is used to do low-level port input and output.
50 .\"O The out* functions do port output, the in* functions do port input;
51 .\"O the b-suffix functions are byte-width and the w-suffix functions
52 .\"O word-width; the _p-suffix functions pause until the I/O completes.
53 この一連の関数はポートに対する低レベルの入出力に使用する。
54 out* 関数はポート出力、in* 関数はポート入力を行う。
55 語尾に b がついている関数はバイト単位、w がついている関数はワード単位である。
56 _p がついている関数は I/O が終了するまで待つ。
57 .LP
58 .\"O They are primarily designed for internal kernel use,
59 .\"O but can be used from user space.
60 .\"O .\" , given the following information
61 .\"O .\" in addition to that given in
62 .\"O .\" .BR outb (9).
63 これらの関数はもともとカーネル内部での使用を想定して設計されているが、
64 ユーザー空間からでも使用できる。
65 .\" 追加の情報は
66 .\" .BR outb (9)
67 .\" にある。
68
69 .\"O You compile with \fB\-O\fP or \fB\-O2\fP or similar.
70 .\"O The functions
71 .\"O are defined as inline macros, and will not be substituted in without
72 .\"O optimization enabled, causing unresolved references at link time.
73 \fB\-O\fP や \fB\-O2\fP などを指定してコンパイルすること。
74 これらの関数はインライン・マクロとして定義されており、
75 最適化を行わないと関数の展開が行われず、
76 リンクの時に「解決できない参照(unresolved reference)」が発生する。
77
78 .\"O You use
79 .\"O .BR ioperm (2)
80 .\"O or alternatively
81 .\"O .BR iopl (2)
82 .\"O to tell the kernel to allow the user space application to access the
83 .\"O I/O ports in question.
84 .\"O Failure to do this will cause the application
85 .\"O to receive a segmentation fault.
86 ユーザー空間のアプリケーションが I/O ポートにアクセスすることを
87 カーネルに教えるために
88 .BR ioperm (2)
89 もしくは
90 .BR iopl (2)
91 を使用すること。これを忘れるとアプリケーションはセグメンテーション違反
92 (segmentation fault) を受けとることになる。
93 .SH 準拠
94 .\"O .BR outb ()
95 .\"O and friends are hardware-specific.
96 .\"O The
97 .\"O .I value
98 .\"O argument is passed first and the
99 .\"O .I port
100 .\"O argument is passed second,
101 .\"O which is the opposite order from most DOS implementations.
102 .BR outb ()
103 とその仲間はハードウェア特有である。
104 .I value
105 引数が最初に渡され、
106 .I port
107 引数が二番目に渡される。
108 この順序はほとんどの DOS での実装とは逆である。
109 .SH 関連項目
110 .BR ioperm (2),
111 .BR iopl (2)