OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man2 / modify_ldt.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1995 Michael Chastain (mec@duracef.shout.net), 22 July 1995.
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" USA.
24 .\"
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH MODIFY_LDT 2 2007\-06\-01 Linux "Linux Programmer's Manual"
31 .SH 名前
32 modify_ldt \- ldt を設定または取得する
33 .SH 書式
34 .nf
35 \fB#include <sys/types.h>\fP
36 .sp
37 \fBint modify_ldt(int \fP\fIfunc\fP\fB, void *\fP\fIptr\fP\fB, unsigned long \fP\fIbytecount\fP\fB);\fP
38 .fi
39 .SH 説明
40 \fBmodify_ldt\fP()  はプロセスのローカル・ディスクリプタ・テーブル (local descriptor table; ldt)
41 を読み書きする。 ldt は i386 プロセッサで使用されるプロセスごとのメモリ管理テーブルである。 このテーブルに関してのより詳しい情報は
42 Intel 386 processor handbook を 参照すること。
43 .PP
44 \fIfunc\fP が 0 ならば、 \fBmodify_ldt\fP()  は ldt を \fIptr\fP が指しているメモリに読み込む。
45 読み込むバイト数は実際の ldt のサイズか \fIbytecount\fP より小さい方である。
46 .PP
47 .\"
48 .\" FIXME ? say something about func == 2 and func == 0x11?
49 .\" In Linux 2.4, func == 2 returned "the default ldt"
50 .\" In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
51 .\" Linux 2.4 and 2.6 implement an operation for func == 0x11
52 \fIfunc\fP が 1 ならば、 \fBmodify_ldt\fP()  は ldt エントリの一つを変更する。 \fIptr\fP は \fIuser_desc\fP
53 構造体を指し、 \fIbytecount\fP はこの構造体の大きさに等しくなければならない。
54
55 \fIuser_desc\fP 構造体は \fI<asm/ldt.h>\fP で以下のように定義されている:
56 .in +4n
57 .nf
58
59 struct user_desc {
60     unsigned int  entry_number;
61     unsigned long base_addr;
62     unsigned int  limit;
63     unsigned int  seg_32bit:1;
64     unsigned int  contents:2;
65     unsigned int  read_exec_only:1;
66     unsigned int  limit_in_pages:1;
67     unsigned int  seg_not_present:1;
68     unsigned int  useable:1;
69 };
70 .fi
71 .in
72 .PP
73 .\" .PP
74 .\" The ldt is specific for the calling process. Any attempts to change
75 .\" the ldt to include the address space of another process or the kernel
76 .\" will result in a segmentation violation when trying to access the memory
77 .\" outside of the process address space. The memory protection is enforced
78 .\" at the paging layer.
79 Linux 2.4 以前では、この構造体は \fImodify_ldt_ldt_s\fP という名前であった。
80 .SH 返り値
81 成功した場合は、 \fBmodify_ldt\fP()  は (読み込みの場合は) 実際に読み込んだバイト数、 または (書き込みの場合は) 0 を返す。
82 失敗した場合は \fBmodify_ldt\fP()  は \-1 を返し、 \fIerrno\fP をエラーを示す値に設定する。
83 .SH エラー
84 .TP 
85 \fBEFAULT\fP
86 \fIptr\fP がアドレス空間の外を指している。
87 .TP 
88 \fBEINVAL\fP
89 \fIptr\fP が 0 である、 または \fIfunc\fP が 1 で \fIbytecount\fP が \fImodify_ldt_ldt_s\fP
90 構造体のサイズと等しくないか、 \fIfunc\fP が 1 で新しい ldt エントリが無効な値である。
91 .TP 
92 \fBENOSYS\fP
93 \fIfunc\fP が 0 でも 1 でもない。
94 .SH 準拠
95 このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけない。
96 .SH 注意
97 glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2)  を使って呼び出すこと。
98 .SH 関連項目
99 \fBvm86\fP(2)