OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / release / 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 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
26 .\"         all rights reserved.
27 .\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
28 .\" Updated & Modified 2005-02-24, Yuichi SATO <ysato444@yahoo.co.jp>
29 .\" Updated 2007-06-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.57
30 .\"
31 .\"WORD:        ldt                     ldt
32 .\"WORD:        local descriptor table  ¥í¡¼¥«¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¦¥Æ¡¼¥Ö¥ë
33 .\"WORD:        processer               ¥×¥í¥»¥Ã¥µ
34 .\"WORD:        entry                   ¥¨¥ó¥È¥ê
35 .\"
36 .TH MODIFY_LDT 2 2007-06-01 "Linux" "Linux Programmer's Manual"
37 .SH Ì¾Á°
38 modify_ldt \- ldt ¤òÀßÄê¤Þ¤¿¤Ï¼èÆÀ¤¹¤ë
39 .SH ½ñ¼°
40 .nf
41 .B #include <sys/types.h>
42 .sp
43 .BI "int modify_ldt(int " "func" ", void *" "ptr" ", unsigned long " "bytecount" );
44 .fi
45 .SH ÀâÌÀ
46 .BR modify_ldt ()
47 ¤Ï¥×¥í¥»¥¹¤Î¥í¡¼¥«¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¦¥Æ¡¼¥Ö¥ë (local descriptor table; ldt)
48 ¤òÆɤ߽ñ¤­¤¹¤ë¡£
49 ldt ¤Ï i386 ¥×¥í¥»¥Ã¥µ¤Ç»ÈÍѤµ¤ì¤ë¥×¥í¥»¥¹¤´¤È¤Î¥á¥â¥ê´ÉÍý¥Æ¡¼¥Ö¥ë¤Ç¤¢¤ë¡£
50 ¤³¤Î¥Æ¡¼¥Ö¥ë¤Ë´Ø¤·¤Æ¤Î¤è¤ê¾Ü¤·¤¤¾ðÊó¤Ï Intel 386 processor handbook ¤ò
51 »²¾È¤¹¤ë¤³¤È¡£
52 .PP
53 .I func
54 ¤¬ 0 ¤Ê¤é¤Ð¡¢
55 .BR modify_ldt ()
56 ¤Ï ldt ¤ò
57 .I ptr
58 ¤¬»Ø¤·¤Æ¤¤¤ë¥á¥â¥ê¤ËÆɤ߹þ¤à¡£
59 Æɤ߹þ¤à¥Ð¥¤¥È¿ô¤Ï¼ÂºÝ¤Î ldt ¤Î¥µ¥¤¥º¤«
60 .I bytecount
61 ¤è¤ê¾®¤µ¤¤Êý¤Ç¤¢¤ë¡£
62 .PP
63 .I func
64 ¤¬ 1 ¤Ê¤é¤Ð¡¢
65 .BR modify_ldt ()
66 ¤Ï ldt ¥¨¥ó¥È¥ê¤Î°ì¤Ä¤òÊѹ¹¤¹¤ë¡£
67 .I ptr
68 ¤Ï
69 .I user_desc
70 ¹½Â¤ÂΤò»Ø¤·¡¢
71 .I bytecount
72 ¤Ï¤³¤Î¹½Â¤ÂΤÎÂ礭¤µ¤ËÅù¤·¤¯¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
73 .\"
74 .\" FIXME ? say something about func == 2 ans func == 0x11?
75 .\" In Linux 2.4, func == 2 returned "the default ldt"
76 .\" In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
77 .\" Linux 2.4 and 2.6 implement an operation for func == 0x11
78
79 .I user_desc
80 ¹½Â¤ÂΤϠ\fI<asm/ldt.h>\fP ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
81 .in +4n
82 .nf
83
84 struct user_desc {
85     unsigned int  entry_number;
86     unsigned long base_addr;
87     unsigned int  limit;
88     unsigned int  seg_32bit:1;
89     unsigned int  contents:2;
90     unsigned int  read_exec_only:1;
91     unsigned int  limit_in_pages:1;
92     unsigned int  seg_not_present:1;
93     unsigned int  useable:1;
94 };
95 .fi
96 .in
97 .PP
98 Linux 2.4 °ÊÁ°¤Ç¤Ï¡¢¤³¤Î¹½Â¤ÂΤÏ
99 .I modify_ldt_ldt_s
100 ¤È¤¤¤¦Ì¾Á°¤Ç¤¢¤Ã¤¿¡£
101 .\" .PP
102 .\" ldt ¤Ï¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Ë¸ÇÍ­¤Î¤â¤Î¤Ç¤¢¤ë¡£
103 .\" Â¾¤Î¥×¥í¥»¥¹¤ä¥«¡¼¥Í¥ë¤Î¥¢¥É¥ì¥¹¶õ´Ö¤ò´Þ¤à¤è¤¦¤Ë ldt ¤òÊѹ¹¤·¤è¤¦¤¹¤ë¤È¡¢
104 .\" ¥×¥í¥»¥¹¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤Î¥á¥â¥ê¤Ë¥¢¥¯¥»¥¹¤·¤è¤¦¤È¤·¤¿¤È¤­¤Ë¡¢
105 .\" ¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó°ãÈ¿ (segmentation violation) ¤Ë¤Ê¤ë¡£
106 .\" ¥á¥â¥êÊݸî¤Ï¥Ú¡¼¥¸¥ó¥°¥ì¥¤¥ä¤Ç¼Â»Ü¤µ¤ì¤ë¡£
107 .SH ÊÖ¤êÃÍ
108 À®¸ù¤·¤¿¾ì¹ç¤Ï¡¢
109 .BR modify_ldt ()
110 ¤Ï (Æɤ߹þ¤ß¤Î¾ì¹ç¤Ï) ¼ÂºÝ¤ËÆɤ߹þ¤ó¤À¥Ð¥¤¥È¿ô¡¢
111 ¤Þ¤¿¤Ï (½ñ¤­¹þ¤ß¤Î¾ì¹ç¤Ï) 0 ¤òÊÖ¤¹¡£
112 ¼ºÇÔ¤·¤¿¾ì¹ç¤Ï
113 .BR modify_ldt ()
114 ¤Ï \-1 ¤òÊÖ¤·¡¢
115 .I errno
116 ¤ò¥¨¥é¡¼¤ò¼¨¤¹ÃͤËÀßÄꤹ¤ë¡£
117 .SH ¥¨¥é¡¼
118 .TP
119 .B EFAULT
120 .I ptr
121 ¤¬¥¢¥É¥ì¥¹¶õ´Ö¤Î³°¤ò»Ø¤·¤Æ¤¤¤ë¡£
122 .TP
123 .B EINVAL
124 .I ptr
125 ¤¬ 0 ¤Ç¤¢¤ë¡¢
126 ¤Þ¤¿¤Ï
127 .I func
128 ¤¬ 1 ¤Ç
129 .I bytecount
130 ¤¬
131 .I modify_ldt_ldt_s
132 ¹½Â¤ÂΤΥµ¥¤¥º¤ÈÅù¤·¤¯¤Ê¤¤¤«¡¢
133 .I func
134 ¤¬ 1 ¤Ç¿·¤·¤¤ ldt ¥¨¥ó¥È¥ê¤¬Ìµ¸ú¤ÊÃͤǤ¢¤ë¡£
135 .TP
136 .B ENOSYS
137 .I func
138 ¤¬ 0 ¤Ç¤â 1 ¤Ç¤â¤Ê¤¤¡£
139 .SH ½àµò
140 ¤³¤Î¥³¡¼¥ë¤Ï Linux ÆÃÍ­¤Ç¤¢¤ê¡¢°Ü¿¢¤ò°Õ¿Þ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï
141 »ÈÍѤ·¤Æ¤Ï¤¤¤±¤Ê¤¤¡£
142 .SH Ãí°Õ
143 glibc ¤Ï¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÂФ¹¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
144 .BR syscall (2)
145 ¤ò»È¤Ã¤Æ¸Æ¤Ó½Ð¤¹¤³¤È¡£
146 .SH ´ØÏ¢¹àÌÜ
147 .BR vm86 (2)