]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/i386_set_ldt.html
xnu-792.21.3.tar.gz
[apple/xnu.git] / osfmk / man / i386_set_ldt.html
1 <h2>i386_set_ldt</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Set per-thread segment descriptors.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t i386_set_ldt</strong>
8 <strong>(thread_act_t</strong> <var>target_act</var>,
9 <strong>int</strong> <var>first_selector</var>,
10 <strong>descriptor_list_t</strong> <var>desc_list</var><strong>);</strong>
11 </pre>
12 <h3>PARAMETERS</h3>
13 <dl>
14 <p>
15 <dt> <var>target_act</var>
16 <dd>
17 [in thread send right]
18 Thread whose segment descriptors are to be set.
19 <p>
20 <dt> <var>first_selector</var>
21 <dd>
22 [in scalar]
23 Selector value (segment register value) corresponding to the
24 first segment whose descriptor is to be set.
25 <p>
26 <dt> <var>desc_list</var>
27 <dd>
28 [pointer to in array of <strong>descriptor_t</strong>]
29 Array of segment descriptors. The
30 following forms are permitted:
31 <ul>
32 <p>
33 <li>
34 Empty descriptor. The <strong>ACC_P</strong> flag (segment present) may or may
35 not be set.
36 <p>
37 <li>
38 <strong>ACC_CALL_GATE</strong>--Converted into a system call gate. The
39 <strong>ACC_P</strong> flag must be set.
40 </ul>
41 <p>
42 All other descriptors must have both the <strong>ACC_P</strong> flag set and specify
43 user mode access (<strong>ACC_PL_U</strong>).
44 <ul>
45 <p>
46 <li>
47 <strong>ACC_DATA</strong>.
48 <p>
49 <li>
50 <strong>ACC_DATA_W</strong>.
51 <p>
52 <li>
53 <strong>ACC_DATA_E</strong>.
54 <p>
55 <li>
56 <strong>ACC_DATA_EW</strong>.
57 <p>
58 <li>
59 <strong>ACC_CODE</strong>.
60 <p>
61 <li>
62 <strong>ACC_CODE_R</strong>.
63 <p>
64 <li>
65 <strong>ACC_CODE_C</strong>.
66 <p>
67 <li>
68 <strong>ACC_CODE_CR</strong>.
69 <p>
70 <li>
71 <strong>ACC_CALL_GATE_16</strong>.
72 <p>
73 <li>
74 <strong>ACC_CALL_GATE</strong>.
75 </ul>
76 </dl>
77 <h3>DESCRIPTION</h3>
78 <p>
79 The <strong>i386_set_ldt</strong> function allows a thread to have a
80 private local descriptor
81 table (LDT) which allows its local segments to map various ranges
82 of its address
83 space.
84 <h3>RETURN VALUES</h3>
85 <p>
86 Only generic errors apply.
87 <h3>RELATED INFORMATION</h3>
88 <p>
89 Functions:
90 <a href="i386_get_ldt.html"><strong>i386_get_ldt<strong></a>.