Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 56 → Rev 57

/SPARTAN/trunk/include/fpu_context.h
4,13 → 4,13
 
 
#include <arch/fpu_context.h>
#include <typedefs.h>
 
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 *);
 
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);
 
 
 
#endif /*fpu_context_h*/
/SPARTAN/trunk/include/proc/thread.h
73,7 → 73,7
 
context_t saved_context;
context_t sleep_timeout_context;
fpu_context_t saved_fpu;
fpu_context_t saved_fpu_context;
waitq_t *sleep_queue;
/SPARTAN/trunk/src/proc/scheduler.c
57,7 → 57,7
void before_thread_runs(void)
{
before_thread_runs_arch();
fpu_context_restore();
fpu_context_restore(&(THREAD->saved_fpu_context));
}
 
 
204,6 → 204,7
 
if (THREAD) {
spinlock_lock(&THREAD->lock);
fpu_context_save(&(THREAD->saved_fpu_context));
if (!context_save(&THREAD->saved_context)) {
/*
* This is the place where threads leave scheduler();
/SPARTAN/trunk/arch/powerpc/src/fpu_context.c
30,34 → 30,21
 
#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
*/
 
}
/SPARTAN/trunk/arch/ia64/src/fpu_context.c
30,34 → 30,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
*/
}
/SPARTAN/trunk/arch/mips/src/fpu_context.c
30,34 → 30,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
*/
}
/SPARTAN/trunk/arch/ia32/src/fpu_context.c
30,17 → 30,17
 
#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
51,7 → 51,7
*/
}
 
void fpu_lazy_context_restore()
void fpu_lazy_context_restore(fpu_context_t *fctx)
{
/*
pushl %eax