direct-io.hg

view linux-2.4.30-xen-sparse/include/asm-xen/desc.h @ 5517:10e9028c8e3d

bitkeeper revision 1.1718.1.10 (42b7b19aqOS_1M8I4pIOFjiTPYWV-g)

Merge bk://xenbits.xensource.com/xen-unstable.bk
into spot.cl.cam.ac.uk:C:/Documents and Settings/iap10/xen-unstable.bk
author iap10@spot.cl.cam.ac.uk
date Tue Jun 21 06:20:10 2005 +0000 (2005-06-21)
parents 85fcf3b1b7a5
children 56a63f9f378f
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 xen_set_ldt(0, 0);
22 }
24 static inline void load_LDT(mm_context_t *pc)
25 {
26 void *segments = pc->ldt;
27 int count = pc->size;
29 if ( count == 0 )
30 segments = NULL;
32 xen_set_ldt((unsigned long)segments, count);
33 }
35 #endif /* __ASSEMBLY__ */
37 #endif /* __ARCH_DESC_H__ */