aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.26-sparse/include/asm-xen/desc.h
diff options
context:
space:
mode:
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2004-04-15 15:55:59 +0000
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2004-04-15 15:55:59 +0000
commit778d03a089c7cc31c5d3f983ecd18704d287fa0e (patch)
treedabfe9171855f64dd1f2fd00f473763dd1dbf154 /xenolinux-2.4.26-sparse/include/asm-xen/desc.h
parent0a4286ffcd388d268719a7b05cdf4276ff546169 (diff)
downloadxen-778d03a089c7cc31c5d3f983ecd18704d287fa0e.tar.gz
xen-778d03a089c7cc31c5d3f983ecd18704d287fa0e.tar.bz2
xen-778d03a089c7cc31c5d3f983ecd18704d287fa0e.zip
bitkeeper revision 1.864.1.1 (407eb08fW2eUAKOIh6v4T-Ew4bCchg)
upgrade to linux 2.4.26
Diffstat (limited to 'xenolinux-2.4.26-sparse/include/asm-xen/desc.h')
-rw-r--r--xenolinux-2.4.26-sparse/include/asm-xen/desc.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/xenolinux-2.4.26-sparse/include/asm-xen/desc.h b/xenolinux-2.4.26-sparse/include/asm-xen/desc.h
new file mode 100644
index 0000000000..33309a9671
--- /dev/null
+++ b/xenolinux-2.4.26-sparse/include/asm-xen/desc.h
@@ -0,0 +1,41 @@
+#ifndef __ARCH_DESC_H
+#define __ARCH_DESC_H
+
+#include <asm/ldt.h>
+
+#ifndef __ASSEMBLY__
+
+struct desc_struct {
+ unsigned long a,b;
+};
+
+struct Xgt_desc_struct {
+ unsigned short size;
+ unsigned long address __attribute__((packed));
+};
+
+extern struct desc_struct default_ldt[];
+
+static inline void clear_LDT(void)
+{
+ /*
+ * NB. We load the default_ldt for lcall7/27 handling on demand, as
+ * it slows down context switching. Noone uses it anyway.
+ */
+ queue_set_ldt(0, 0);
+}
+
+static inline void load_LDT(mm_context_t *pc)
+{
+ void *segments = pc->ldt;
+ int count = pc->size;
+
+ if ( count == 0 )
+ segments = NULL;
+
+ queue_set_ldt((unsigned long)segments, count);
+}
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ARCH_DESC_H__ */