Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 308 → Rev 309

/SPARTAN/trunk/arch/amd64/src/interrupt.c
38,9 → 38,9
#include <arch.h>
#include <symtab.h>
#include <arch/asm.h>
#include <proc/scheduler.h>
 
 
 
static void messy_stack_trace(__native *stack)
{
__native *upper_limit = (__native *)(((__native)get_stack_base()) + STACK_SIZE);
138,20 → 138,11
 
void nm_fault(__u8 n, __native stack[])
{
reset_TS_flag();
if (CPU->fpu_owner != NULL) {
fpu_lazy_context_save(&CPU->fpu_owner->saved_fpu_context);
/* don't prevent migration */
CPU->fpu_owner->fpu_context_engaged=0;
}
if (THREAD->fpu_context_exists)
fpu_lazy_context_restore(&THREAD->saved_fpu_context);
else {
fpu_init();
THREAD->fpu_context_exists=1;
}
CPU->fpu_owner=THREAD;
THREAD->fpu_context_engaged = 1;
#ifdef FPU_LAZY
scheduler_fpu_lazy_request();
#else
panic("fpu fault");
#endif
}