Subversion Repositories HelenOS

Rev

Rev 117 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 117 Rev 125
Line 95... Line 95...
95
 
95
 
96
 
96
 
97
void nm_fault(__u8 n, __u32 stack[])
97
void nm_fault(__u8 n, __u32 stack[])
98
{
98
{
99
    reset_TS_flag();
99
    reset_TS_flag();
100
        if ((CPU->fpu_owner)!=NULL)
100
    if ((CPU->fpu_owner)!=NULL) {  
101
    {  
-
 
102
            fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context));
101
        fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context));
103
        (CPU->fpu_owner)->fpu_context_engaged=0; /* don't prevent migration */
102
        (CPU->fpu_owner)->fpu_context_engaged=0; /* don't prevent migration */
104
    }
103
    }
105
    if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context));
104
    if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context));
106
        else {fpu_init();THREAD->fpu_context_exists=1;}
105
    else {fpu_init();THREAD->fpu_context_exists=1;}
107
    CPU->fpu_owner=THREAD;
106
    CPU->fpu_owner=THREAD;
108
}
107
}
109
 
108
 
110
 
109
 
111
 
110