Index: arch/ia32/src/fpu_context.c
===================================================================
--- arch/ia32/src/fpu_context.c	(revision 0c47db1790819c45bc70d5e7cfa28edd765464aa)
+++ arch/ia32/src/fpu_context.c	(revision 9c926f39b8a11f838823c4f9c29d773f16ec79ce)
@@ -31,15 +31,15 @@
 #include <fpu_context.h>
 
-void fpu_context_save(void)
+void fpu_context_save(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_context_restore()
+void fpu_context_restore(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_lazy_context_save()
+void fpu_lazy_context_save(fpu_context_t *fctx)
 {
 /*
@@ -52,5 +52,5 @@
 }
 
-void fpu_lazy_context_restore()
+void fpu_lazy_context_restore(fpu_context_t *fctx)
 {
 /*
Index: arch/ia64/src/fpu_context.c
===================================================================
--- arch/ia64/src/fpu_context.c	(revision 0c47db1790819c45bc70d5e7cfa28edd765464aa)
+++ arch/ia64/src/fpu_context.c	(revision 9c926f39b8a11f838823c4f9c29d773f16ec79ce)
@@ -31,33 +31,19 @@
 #include <fpu_context.h>
 
-void fpu_context_save(void)
+void fpu_context_save(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_context_restore()
+void fpu_context_restore(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_lazy_context_save()
+void fpu_lazy_context_save(fpu_context_t *fctx)
 {
-/*
-	pushl %eax
-        mov 8(%esp),%eax
-        fxsave (%eax)
-        popl %eax
-        ret
-*/	
 }
 
-void fpu_lazy_context_restore()
+void fpu_lazy_context_restore(fpu_context_t *fctx)
 {
-/*
-	pushl %eax
-        mov 8(%esp),%eax
-        fxrstor (%eax)
-        popl %eax
-        ret
-*/	
 }
Index: arch/mips/src/fpu_context.c
===================================================================
--- arch/mips/src/fpu_context.c	(revision 0c47db1790819c45bc70d5e7cfa28edd765464aa)
+++ arch/mips/src/fpu_context.c	(revision 9c926f39b8a11f838823c4f9c29d773f16ec79ce)
@@ -31,33 +31,19 @@
 #include <fpu_context.h>
 
-void fpu_context_save(void)
+void fpu_context_save(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_context_restore()
+void fpu_context_restore(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_lazy_context_save()
+void fpu_lazy_context_save(fpu_context_t *fctx)
 {
-/*
-	pushl %eax
-        mov 8(%esp),%eax
-        fxsave (%eax)
-        popl %eax
-        ret
-*/	
 }
 
-void fpu_lazy_context_restore()
+void fpu_lazy_context_restore(fpu_context_t *fctx)
 {
-/*
-	pushl %eax
-        mov 8(%esp),%eax
-        fxrstor (%eax)
-        popl %eax
-        ret
-*/	
 }
Index: arch/powerpc/src/fpu_context.c
===================================================================
--- arch/powerpc/src/fpu_context.c	(revision 0c47db1790819c45bc70d5e7cfa28edd765464aa)
+++ arch/powerpc/src/fpu_context.c	(revision 9c926f39b8a11f838823c4f9c29d773f16ec79ce)
@@ -31,33 +31,20 @@
 #include <fpu_context.h>
 
-void fpu_context_save(void)
+void fpu_context_save(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_context_restore()
+void fpu_context_restore(fpu_context_t *fctx)
 {
 }
 
 
-void fpu_lazy_context_save()
+void fpu_lazy_context_save(fpu_context_t *fctx)
 {
-/*
-	pushl %eax
-        mov 8(%esp),%eax
-        fxsave (%eax)
-        popl %eax
-        ret
-*/	
 }
 
-void fpu_lazy_context_restore()
+void fpu_lazy_context_restore(fpu_context_t *fctx)
 {
-/*
-	pushl %eax
-        mov 8(%esp),%eax
-        fxrstor (%eax)
-        popl %eax
-        ret
-*/	
+
 }
Index: include/fpu_context.h
===================================================================
--- include/fpu_context.h	(revision 0c47db1790819c45bc70d5e7cfa28edd765464aa)
+++ include/fpu_context.h	(revision 9c926f39b8a11f838823c4f9c29d773f16ec79ce)
@@ -5,10 +5,10 @@
 
 #include <arch/fpu_context.h>
+#include <typedefs.h>
 
-
-extern void fpu_context_save(void);
-extern void fpu_context_restore(void);
-extern void fpu_lazy_context_save(void);
-extern void fpu_lazy_context_restore(void);
+extern void fpu_context_save(fpu_context_t *);
+extern void fpu_context_restore(fpu_context_t *);
+extern void fpu_lazy_context_save(fpu_context_t *);
+extern void fpu_lazy_context_restore(fpu_context_t *);
 
 
Index: include/proc/thread.h
===================================================================
--- include/proc/thread.h	(revision 0c47db1790819c45bc70d5e7cfa28edd765464aa)
+++ include/proc/thread.h	(revision 9c926f39b8a11f838823c4f9c29d773f16ec79ce)
@@ -74,5 +74,5 @@
 	context_t saved_context;
 	context_t sleep_timeout_context;
-	fpu_context_t saved_fpu;	               
+	fpu_context_t saved_fpu_context;	               
 	
 	
Index: src/proc/scheduler.c
===================================================================
--- src/proc/scheduler.c	(revision 0c47db1790819c45bc70d5e7cfa28edd765464aa)
+++ src/proc/scheduler.c	(revision 9c926f39b8a11f838823c4f9c29d773f16ec79ce)
@@ -58,5 +58,5 @@
 {
 	before_thread_runs_arch(); 
-	fpu_context_restore();
+	fpu_context_restore(&(THREAD->saved_fpu_context));
 }
 
@@ -205,4 +205,5 @@
 	if (THREAD) {
 		spinlock_lock(&THREAD->lock);
+		fpu_context_save(&(THREAD->saved_fpu_context));
 		if (!context_save(&THREAD->saved_context)) {
 			/*
