.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 1995 Paul Gortmaker .\" (gpg109@rsphy1.anu.edu.au) .\" Wed Nov 29 10:58:54 EST 1995 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Japanese Version Copyright (c) 1996 HANATAKA Shinya .\" all rights reserved. .\" Translated Wed Dec 4 15:19:14 JST 1996 .\" by HANATAKA Shinya .\" Updated Fri Dec 14 JST 2001 by Kentaro Shirakata .\" Updated Sun May 23 JST 2004 by Kentaro Shirakata .\" Updated Thu Mar 24 JST 2005 by Kentaro Shirakata .\" Updated Thu Oct 9 JST 2005 by Kentaro Shirakata .\" .\"WORD: inline macro インライン・マクロ .\"WORD: unresolved reference 解決できない参照 .\"WORD: segmentation fault セグメンテーション違反 .\" .TH OUTB 2 1995-11-29 "Linux" "Linux Programmer's Manual" .SH 名前 outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, outb_p, outw_p, outl_p, inb_p, inw_p, inl_p \- ポート入出力 .SH 説明 この一連の関数はポートに対する低レベルの入出力に使用する。 out* 関数はポート出力、in* 関数はポート入力を行う。 語尾に b がついている関数はバイト単位、w がついている関数はワード単位である。 _p がついている関数は I/O が終了するまで待つ。 .LP これらの関数はもともとカーネル内部での使用を想定して設計されているが、 ユーザー空間からでも使用できる。 .\" 追加の情報は .\" .BR outb (9) .\" にある。 \fB\-O\fP や \fB\-O2\fP などを指定してコンパイルすること。 これらの関数はインライン・マクロとして定義されており、 最適化を行わないと関数の展開が行われず、 リンクの時に「解決できない参照(unresolved reference)」が発生する。 ユーザー空間のアプリケーションが I/O ポートにアクセスすることを カーネルに教えるために .BR ioperm (2) もしくは .BR iopl (2) を使用すること。これを忘れるとアプリケーションはセグメンテーション違反 (segmentation fault) を受けとることになる。 .SH 準拠 .BR outb () とその仲間はハードウェア特有である。 .I value 引数が最初に渡され、 .I port 引数が二番目に渡される。 この順序はほとんどの DOS での実装とは逆である。 .SH 関連項目 .BR ioperm (2), .BR iopl (2)