1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 1995 Michael Chastain (mec@duracef.shout.net), 22 July 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) 1997 HANATAKA Shinya
.\" all rights reserved.
.\" Translated 1997-02-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated & Modified 2005-02-24, Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated 2007-06-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.57
.\"
.\"WORD: ldt ldt
.\"WORD: local descriptor table 롦ǥץơ֥
.\"WORD: processer ץå
.\"WORD: entry ȥ
.\"
.TH MODIFY_LDT 2 2007-06-01 "Linux" "Linux Programmer's Manual"
.SH ̾
modify_ldt \- ldt ޤϼ
.SH
.nf
.B #include <sys/types.h>
.sp
.BI "int modify_ldt(int " "func" ", void *" "ptr" ", unsigned long " "bytecount" );
.fi
.SH
.BR modify_ldt ()
ϥץΥ롦ǥץơ֥ (local descriptor table; ldt)
ɤ߽롣
ldt i386 ץåǻѤץȤΥơ֥Ǥ롣
Υơ֥˴ؤƤΤܤ Intel 386 processor handbook
Ȥ뤳ȡ
.PP
.I func
0 ʤС
.BR modify_ldt ()
ldt
.I ptr
ؤƤɤ߹ࡣ
ɤ߹Хȿϼºݤ ldt Υ
.I bytecount
꾮Ǥ롣
.PP
.I func
1 ʤС
.BR modify_ldt ()
ldt ȥΰĤѹ롣
.I ptr
.I user_desc
¤Τؤ
.I bytecount
Ϥι¤Τ礭ʤФʤʤ
.\"
.\" FIXME ? say something about func == 2 ans func == 0x11?
.\" In Linux 2.4, func == 2 returned "the default ldt"
.\" In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
.\" Linux 2.4 and 2.6 implement an operation for func == 0x11
.I user_desc
¤Τ \fI<asm/ldt.h>\fP ǰʲΤ褦Ƥ:
.in +4n
.nf
struct user_desc {
unsigned int entry_number;
unsigned long base_addr;
unsigned int limit;
unsigned int seg_32bit:1;
unsigned int contents:2;
unsigned int read_exec_only:1;
unsigned int limit_in_pages:1;
unsigned int seg_not_present:1;
unsigned int useable:1;
};
.fi
.in
.PP
Linux 2.4 Ǥϡι¤Τ
.I modify_ldt_ldt_s
Ȥ̾Ǥä
.\" .PP
.\" ldt ϸƤӽФץ˸ͭΤΤǤ롣
.\" ¾Υץ䥫ͥΥɥ쥹֤ޤ褦 ldt ѹ褦ȡ
.\" ץɥ쥹֤γΥ˥褦ȤȤˡ
.\" ơȿ (segmentation violation) ˤʤ롣
.\" ݸϥڡ쥤Ǽ»ܤ롣
.SH ֤
ϡ
.BR modify_ldt ()
(ɤ߹ߤξ) ºݤɤ߹Хȿ
ޤ (ߤξ) 0 ֤
Ԥ
.BR modify_ldt ()
\-1 ֤
.I errno
顼ͤꤹ롣
.SH 顼
.TP
.B EFAULT
.I ptr
ɥ쥹֤γؤƤ롣
.TP
.B EINVAL
.I ptr
0 Ǥ롢
ޤ
.I func
1
.I bytecount
.I modify_ldt_ldt_s
¤ΤΥʤ
.I func
1 ǿ ldt ȥ̵꤬ͤǤ롣
.TP
.B ENOSYS
.I func
0 Ǥ 1 Ǥʤ
.SH
Υ Linux ͭǤꡢܿտޤץǤ
ѤƤϤʤ
.SH
glibc ϤΥƥॳФåѡؿƤʤ
.BR syscall (2)
ȤäƸƤӽФȡ
.SH Ϣ
.BR vm86 (2)
|