X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/4d15aeb193b2c68f1d38666c317f8d3734f5f083..5ba3f43ea354af8ad55bea84372a2bc834d8757c:/bsd/dev/arm/table_inline.h diff --git a/bsd/dev/arm/table_inline.h b/bsd/dev/arm/table_inline.h new file mode 100644 index 000000000..8f358e423 --- /dev/null +++ b/bsd/dev/arm/table_inline.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. + */ +/* + * Copyright (c) 1992 NeXT Computer, Inc. + * + * Intel386 Family: Selector based access to descriptor tables. + * + * HISTORY + * + * 2 April 1992 ? at NeXT + * Created. + */ + +#include + +#include +#include + +static inline gdt_entry_t * +sel_to_gdt_entry(sel_t sel) +{ + return (&gdt[sel.index]); +} + +static inline idt_entry_t * +sel_to_idt_entry(sel_t sel) +{ + return (&idt[sel.index]); +} + +static inline ldt_entry_t * +sel_to_ldt_entry(ldt_t *tbl, sel_t sel) +{ + return (&tbl[sel.index]); +}