ia64/xen-unstable

view linux-2.4.29-xen-sparse/include/asm-xen/desc.h @ 3887:4385894c52ae

bitkeeper revision 1.1230.2.4 (421a95cepOZORm0EbZfqBeZ6PZ8MwA)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xen-unstable.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
author iap10@freefall.cl.cam.ac.uk
date Tue Feb 22 02:15:42 2005 +0000 (2005-02-22)
parents 0a4b76b6b5a0
children 96bece6d7b61 7d66265be1c5 445b12a7221a
line source
1 #ifndef __ARCH_DESC_H
2 #define __ARCH_DESC_H
4 #include <asm/ldt.h>
6 #ifndef __ASSEMBLY__
8 struct desc_struct {
9 unsigned long a,b;
10 };
12 struct Xgt_desc_struct {
13 unsigned short size;
14 unsigned long address __attribute__((packed));
15 };
17 extern struct desc_struct default_ldt[];
19 static inline void clear_LDT(void)
20 {
21 /*
22 * NB. We load the default_ldt for lcall7/27 handling on demand, as
23 * it slows down context switching. Noone uses it anyway.
24 */
25 queue_set_ldt(0, 0);
26 }
28 static inline void load_LDT(mm_context_t *pc)
29 {
30 void *segments = pc->ldt;
31 int count = pc->size;
33 if ( count == 0 )
34 segments = NULL;
36 queue_set_ldt((unsigned long)segments, count);
37 }
39 #endif /* __ASSEMBLY__ */
41 #endif /* __ARCH_DESC_H__ */