]> git.saurik.com Git - apple/xnu.git/blob - bsd/dev/arm/table_inline.h
f5996137d3f8dcd8170138af34918a21117e9ce0
[apple/xnu.git] / bsd / dev / arm / table_inline.h
1 /*
2 * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
3 */
4 /*
5 * Copyright (c) 1992 NeXT Computer, Inc.
6 *
7 * Intel386 Family: Selector based access to descriptor tables.
8 *
9 * HISTORY
10 *
11 * 2 April 1992 ? at NeXT
12 * Created.
13 */
14
15 #include <architecture/i386/table.h>
16
17 #include <machdep/i386/gdt.h>
18 #include <machdep/i386/idt.h>
19
20 static inline gdt_entry_t *
21 sel_to_gdt_entry(sel_t sel)
22 {
23 return &gdt[sel.index];
24 }
25
26 static inline idt_entry_t *
27 sel_to_idt_entry(sel_t sel)
28 {
29 return &idt[sel.index];
30 }
31
32 static inline ldt_entry_t *
33 sel_to_ldt_entry(ldt_t *tbl, sel_t sel)
34 {
35 return &tbl[sel.index];
36 }