]> git.saurik.com Git - apple/xnu.git/blame - bsd/dev/arm/table_inline.h
xnu-4570.1.46.tar.gz
[apple/xnu.git] / bsd / dev / arm / table_inline.h
CommitLineData
5ba3f43e
A
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
20static inline gdt_entry_t *
21sel_to_gdt_entry(sel_t sel)
22{
23 return (&gdt[sel.index]);
24}
25
26static inline idt_entry_t *
27sel_to_idt_entry(sel_t sel)
28{
29 return (&idt[sel.index]);
30}
31
32static inline ldt_entry_t *
33sel_to_ldt_entry(ldt_t *tbl, sel_t sel)
34{
35 return (&tbl[sel.index]);
36}