Esempio n. 1
0
void 
motor_servo_isr(void)
{
  fppSave(&pfc);  
  ++motor_servo_calls;
  servo_time += 1./(double)motor_servo_rate;
  semGive(motor_servo_sem);
  fppRestore(&pfc); 
}
static void
fpuInit()
{
    FP_CONTEXT fpContext;
    fppSave(&fpContext);
    /* disable floating-point traps */
#if defined(__i386__)
    /* set the fp control word precision to 53-bit for both single and double precision */
    fpContext.fpcr = 0xffff027f; 
    fppRestore(&fpContext);
#elif defined(__sparc__)
    fpContext.fsr &= ~0x0f800000;
    fppRestore(&fpContext);
    fppSave(&fpContext);
#endif
#if 1
    {
	int options = -1;
	int status = taskOptionsGet(0, &options);
	assert(status == OK);
	assert(options & VX_FP_TASK);
    }
#endif
}