subrata_modak | e03fa31 | 2009-08-26 06:44:25 +0000 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <errno.h> |
subrata_modak | e03fa31 | 2009-08-26 06:44:25 +0000 | [diff] [blame] | 3 | |
| 4 | /* Harness Specific Include Files. */ |
| 5 | #include "test.h" |
subrata_modak | e03fa31 | 2009-08-26 06:44:25 +0000 | [diff] [blame] | 6 | #include "linux_syscall_numbers.h" |
| 7 | #include "config.h" |
| 8 | |
| 9 | #if defined HAVE_ASM_LDT_H |
yaberauneya | 335f650 | 2009-10-22 09:25:19 +0000 | [diff] [blame] | 10 | #include <linux/unistd.h> |
subrata_modak | e03fa31 | 2009-08-26 06:44:25 +0000 | [diff] [blame] | 11 | #include <asm/ldt.h> |
| 12 | |
| 13 | #if defined HAVE_STRUCT_USER_DESC |
| 14 | typedef struct user_desc thread_area_s; |
| 15 | #elif defined HAVE_STRUCT_MODIFY_LDT_LDT_S |
| 16 | typedef struct modify_ldt_ldt_s thread_area_s; |
| 17 | #else |
| 18 | typedef struct user_desc { |
| 19 | unsigned int entry_number; |
| 20 | unsigned long int base_addr; |
| 21 | unsigned int limit; |
| 22 | unsigned int seg_32bit:1; |
| 23 | unsigned int contents:2; |
| 24 | unsigned int read_exec_only:1; |
| 25 | unsigned int limit_in_pages:1; |
| 26 | unsigned int seg_not_present:1; |
| 27 | unsigned int useable:1; |
| 28 | unsigned int empty:25; |
| 29 | } thread_area_s; |
| 30 | #endif /* HAVE_STRUCT_USER_DESC */ |
| 31 | #endif /* HAVE_ASM_LDT_H */ |