EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  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  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: print from interrupt
From: Allan Honey <[email protected]>
To: [email protected]
Date: Fri, 27 Feb 2004 12:41:54 -1000 (HST)
Just in case you find it absolutely essential to perform floating
point calculations within an Interrupt Service Routine - on Vxworks 
(as inadvisable as that may be)

        FP_CONTEXT fp_context;

        (void) fppSave (&fp_context);
        
        <your ISR code here>
        
        (void) fppRestore (&fp_context);


AH

> Date: Fri, 27 Feb 2004 16:22:53 -0600
> From: Eric Norum <[email protected]>
> 
> D. Peter Siddons wrote:
> > Thanks to all who responded. I should have made it clear that I was 
> > talking about an RTEMS app., which only has 
> > epicsInterruptContextMessage(), which can only print a string, no 
> > formatting. Eric Norum suggested using snprintf() to fill a buffer and 
> > pass that to epicsInterruptContextMessage(). That seems to work fine. I 
> > had the impression before that calling any of the xprintf() commands 
> > from within interrupt context wasn't allowed, but apparently the string 
> > variants are OK.
> > Pete.
> The string variants can't ever block so they're safe to call from an interrupt 
> handler -- with one small caveat.  Interrupt handlers typically do not have 
> their own floating point context so you've got to ensure that snprintf does 
> not execute any floating-point instructions.
> 
> -- 
> Eric Norum                                 [email protected]
> Advanced Photon Source                     Phone: (630) 252-4793
> Argonne National Laboratory
> 



Navigate by Date:
Prev: OMS VX2-006 motor controller problem Ronald L. Sluiter
Next: Re: gtr1-2 for SIS3301. Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: print from interrupt Eric Norum
Next: Re: gtr1-2 for SIS3301. Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  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 ·