All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Saving floating point registers inside ISR
@ 2008-06-04 21:19 Henry Bausley
  2008-06-04 22:07 ` Jan Kiszka
  2008-06-05  7:41 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 3+ messages in thread
From: Henry Bausley @ 2008-06-04 21:19 UTC (permalink / raw)
  To: xenomai


I am converting a 440EP power pc FSM Labs RT-Linux application to a
Xenomai 2.4.2 posix application. Previously we saved the floating point
registers in the ISR.  I had the following code with RTLinux.

//-----------------------------------------------------------------------------
int phase_intr(xnintr_t *cookie)
{
  rthal_fpenv_t fpustate;

  rthal_save_fpu(&fpustate);

  phase();

  rthal_restore_fpu(&fpustate);
  return (XN_ISR_HANDLED);
}

with xenomai if we do the the same thing the system hangs.


However if we make the location where we save the registers global, or
declare it static inside the ISR we don't have a problem.  I don't want
to do that since there are cases when the interrupt can be re-entered.
Does anyone have any ideas?

rthal_fpenv_t fpustate;

//-----------------------------------------------------------------------------
int phase_intr(xnintr_t *cookie)
{

  rthal_save_fpu(&fpustate);

  phase();

  rthal_restore_fpu(&fpustate);
  return (XN_ISR_HANDLED);
}





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-05  7:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04 21:19 [Xenomai-help] Saving floating point registers inside ISR Henry Bausley
2008-06-04 22:07 ` Jan Kiszka
2008-06-05  7:41 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.