Subversion Repositories HelenOS-historic

Rev

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

Rev 90 Rev 92
Line 94... Line 94...
94
}
94
}
95
 
95
 
96
 
96
 
97
void nm_fault(__u8 n, __u32 stack[])
97
void nm_fault(__u8 n, __u32 stack[])
98
{
98
{
99
 
-
 
100
//  printf("-1\n");        
-
 
101
    reset_TS_flag();
99
    reset_TS_flag();
102
        if ((CPU->fpu_owner)!=NULL)
100
        if ((CPU->fpu_owner)!=NULL)
103
    {  
101
    {  
104
//      printf("tid:%d \n", THREAD->tid);
-
 
105
//      printf("owner:%d\n", (CPU->fpu_owner)->tid);
-
 
106
            fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context));
102
            fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context));
107
 
-
 
108
//          printf("owner 2\n");
-
 
109
        (CPU->fpu_owner)->fpu_context_engaged=0; /* Enables migration */
103
        (CPU->fpu_owner)->fpu_context_engaged=0; /* don't prevent migration */
110
//          printf("owner 3\n");        
-
 
111
 
-
 
112
    }
104
    }
113
//  printf("0\n");
-
 
114
    if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context));
105
    if(THREAD->fpu_context_exists) fpu_lazy_context_restore(&(THREAD->saved_fpu_context));
115
        else {fpu_init();THREAD->fpu_context_exists=1;}
106
        else {fpu_init();THREAD->fpu_context_exists=1;}
116
//  printf("1\n");
-
 
117
    CPU->fpu_owner=THREAD;
107
    CPU->fpu_owner=THREAD;
118
//  printf("2\n");
-
 
119
   
-
 
120
//  printf("3\n");  
-
 
121
//  panic("#NM fault\n");
-
 
122
}
108
}
123
 
109
 
124
 
110
 
125
 
111
 
126
void page_fault(__u8 n, __u32 stack[])
112
void page_fault(__u8 n, __u32 stack[])