EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Interrupt routines
From: Tim Mooney <[email protected]>
To: [email protected]
Date: Sun, 28 Nov 1999 17:49:43 -0600 (CST)
Mark, re...

> I am having intermittent problems which appear to be corruption of floating
> point operations.  It just occurred to me that perhaps the problem is because I
> am doing floating point operations in an interrupt service routine.  I am
> running vxWorks 5.3.1 on an MVME162 CPU.  Is one allowed to do floating point
> arithmetic in an interrupt service routine, or are the FP registers not saved
> and restored in interrupt routines?  Is there a compiler switch or directive
> to control this?

The floating point registers are not saved through interrupts.  They're
not even saved though task switches unless the task using them was
spawned with the option VX_FP_TASK.  You can save and restore them by
hand on entry to/exit from an interrupt handler by #include'ing ffpLib.h,
malloc'ing a context buffer, and calling fppSave(FP_CONTEXT *pContext)
and fppRestore(FP_CONTEXT *pContext).  BTW, you can't call malloc()
from interrupt level because it takes a semaphore.

I don't know of a compiler switch that makes saving FP registers the
default behavior.

Tim Mooney ([email protected]) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab



Navigate by Date:
Prev: Interrupt routines Mark Rivers
Next: Channel Access Client library Eric Boucher
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Interrupt routines Mark Rivers
Next: Channel Access Client library Eric Boucher
Index: 1994  1995  1996  1997  1998  <19992000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·