aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/include/sched.h
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-05-02 09:12:39 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-05-02 09:12:39 +0100
commitf08246e1976e3ae483c2568e4e510cb3f2b6e44d (patch)
treeb4a7999be3d4dc10a52652824a3dde2cc767ed29 /extras/mini-os/include/sched.h
parentaf8fc368d78db62f9f637e7e433d1a5027ef47b1 (diff)
downloadxen-f08246e1976e3ae483c2568e4e510cb3f2b6e44d.tar.gz
xen-f08246e1976e3ae483c2568e4e510cb3f2b6e44d.tar.bz2
xen-f08246e1976e3ae483c2568e4e510cb3f2b6e44d.zip
Fix x86/64 version of Mini-OS. It encompasses the following:
a) 64-bit switch_to scheduler macro (by Aravindh Puthiyaparambil) b) implements 64-bit hypervisor_callback c) fixes thread creation issues (thread_starter used to perform initialisation) Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Diffstat (limited to 'extras/mini-os/include/sched.h')
-rw-r--r--extras/mini-os/include/sched.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/extras/mini-os/include/sched.h b/extras/mini-os/include/sched.h
index d7b26289ff..ce57be8a6c 100644
--- a/extras/mini-os/include/sched.h
+++ b/extras/mini-os/include/sched.h
@@ -7,8 +7,8 @@ struct thread
{
char *name;
char *stack;
- unsigned long eps;
- unsigned long eip;
+ unsigned long sp; /* Stack pointer */
+ unsigned long ip; /* Instruction pointer */
struct list_head thread_list;
u32 flags;
};
@@ -25,7 +25,9 @@ static inline struct thread* get_current(void)
struct thread **current;
#ifdef __i386__
__asm__("andl %%esp,%0; ":"=r" (current) : "r" (~8191UL));
-#endif
+#else
+ __asm__("andq %%rsp,%0; ":"=r" (current) : "r" (~8191UL));
+#endif
return *current;
}