PUBLIC void save_local_fpu(struct proc *pr)
{
- if(!fpu_presence)
+ if(!is_fpu())
return;
/* Save changed FPU context. */
PUBLIC void save_fpu(struct proc *pr)
{
-#if CONFIG_SMP
+#ifdef CONFIG_SMP
if (cpuid == pr->p_cpu) {
- save_local_fpu(pr);
+ if (get_cpulocal_var(fpu_owner) == pr) {
+ disable_fpu_exception();
+ save_local_fpu(pr);
+ }
}
else {
int stopped;
RTS_UNSET(pr, RTS_PROC_STOP);
}
#else
- save_local_fpu(pr);
+ if (get_cpulocal_var(fpu_owner) == pr) {
+ disable_fpu_exception();
+ save_local_fpu(pr);
+ }
#endif
}
EXTERN time_t boottime;
EXTERN char params_buffer[512]; /* boot monitor parameters */
EXTERN int minix_panicing;
-EXTERN char fpu_presence;
EXTERN int verboseboot; /* verbose boot, init'ed in cstart */
#define MAGICTEST 0xC0FFEE23
EXTERN u32_t magictest; /* global magic number */