segment.h (da733563be5a9da26fe81d9f007262d00b846e22) segment.h (f8d65d27e677da0ce33de570e3068308a77ed2b1)
1#ifndef __UM_SEGMENT_H
2#define __UM_SEGMENT_H
3
4extern int host_gdt_entry_tls_min;
5
6#define GDT_ENTRY_TLS_ENTRIES 3
7#define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min
8#define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
9
1#ifndef __UM_SEGMENT_H
2#define __UM_SEGMENT_H
3
4extern int host_gdt_entry_tls_min;
5
6#define GDT_ENTRY_TLS_ENTRIES 3
7#define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min
8#define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
9
10typedef struct {
11 unsigned long seg;
12} mm_segment_t;
13
14#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) })
15#define KERNEL_DS MAKE_MM_SEG(~0UL)
16#define USER_DS MAKE_MM_SEG(TASK_SIZE)
17
10#endif
18#endif