• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _ASM_X86_LDT_H
20 #define _ASM_X86_LDT_H
21 #define LDT_ENTRIES 8192
22 #define LDT_ENTRY_SIZE 8
23 #ifndef __ASSEMBLY__
24 struct user_desc {
25   unsigned int entry_number;
26   unsigned int base_addr;
27   unsigned int limit;
28   unsigned int seg_32bit : 1;
29   unsigned int contents : 2;
30   unsigned int read_exec_only : 1;
31   unsigned int limit_in_pages : 1;
32   unsigned int seg_not_present : 1;
33   unsigned int useable : 1;
34 #ifdef __x86_64__
35   unsigned int lm : 1;
36 #endif
37 };
38 #define MODIFY_LDT_CONTENTS_DATA 0
39 #define MODIFY_LDT_CONTENTS_STACK 1
40 #define MODIFY_LDT_CONTENTS_CODE 2
41 #endif
42 #endif
43