diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2006-11-05 20:39:25 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:50 +0200 |
commit | 851fdb496728e83cdb3f591a674d3425efc1f11c (patch) | |
tree | db509b0e1331721cfc4228fbdd85a111692d148e /linux | |
parent | 0487d0193161eae0f56d2f9eab0d901dc8d0fe07 (diff) |
2006-11-05 Barry deFreese <bddebian@comcast.net>
[task #5878 --- ``Backport code from GNU Mach's trunk to
gnumach-1-branch: i386_set_gdt, i386_get_gdt'']
* i386/include/mach/i386/mach_i386.defs (i386_set_gdt, i386_get_gdt):
New routines.
* i386/i386/user_ldt.c (i386_set_gdt, i386_get_gdt): New functions.
* i386/i386/gdt.h (USER_GDT, USER_GDT_SLOTS): New macros.
(GDTSZ): Compute it from USER_GDT and USER_GDT_SLOTS.
* i386/i386/thread.h: Include `gdt.h'.
(struct i386_machine_state): New member `user_gdt'.
* i386/i386/pcb.c (switch_ktss): Copy those slots into the GDT.
* linux/dev/include/linux/head.h: New file.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/dev/include/linux/head.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/linux/dev/include/linux/head.h b/linux/dev/include/linux/head.h new file mode 100644 index 0000000..c501f21 --- /dev/null +++ b/linux/dev/include/linux/head.h @@ -0,0 +1,20 @@ +#ifndef _LINUX_HEAD_H +#define _LINUX_HEAD_H + +typedef struct desc_struct { + unsigned long a,b; +} desc_table[256]; + +/* XXX Linux code shouldn't use idt/gdt directly */ +/* extern desc_table idt,gdt; */ + +#define GDT_NUL 0 +#define GDT_CODE 1 +#define GDT_DATA 2 +#define GDT_TMP 3 + +#define LDT_NUL 0 +#define LDT_CODE 1 +#define LDT_DATA 2 + +#endif |