EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: 2 MAXv problems
From: "Steven M. Hartman" <[email protected]>
To: Eric Norum <[email protected]>, EPICS <[email protected]>
Date: Thu, 11 Mar 2010 12:57:12 -0500
Eric Norum wrote:
"Don't block" and "don't alloc/free" certainly are necessary conditions for a routine to be ISR safe. But as you indicate there are a lot more things to worry about as well. Given the range of architectures and compilers with which EPICS can be used I really think that it's best to stick to routines that are explicitly described as safe. This is especially true given that calling a non-safe routine is likely to result in a system that fails very occasionally in a manner that would be very hard to debug.

Could someone with a more up to date version of the vxWorks manual check and see if there have been additions to the "safe" list since the very old manual from which I quoted?


The "Routines Callable by ISRs" table from VxWorks 6.7 is pasted at the end of this message (sorry about the formatting). Not that different then the previous version you sent.

Looking at sprintf(), it can call malloc() internally which calls semTake() which is not ISR safe. (And it may also do other non-safe actions.)

--
Steven Hartman
[email protected] || 865-466-6473

Table 7-24 :Routines Callable by ISRs

Library
	

Routine

bLib
	

All routines

errnoLib
	

errnoGet( ), errnoSet( )

eventLib
	

eventSend( )

fppArchLib
	

fppSave( ), fppRestore( )

intLib
	

intContext( ), intCount( ), intVecSet( ), intVecGet( )

intArchLib
	

intLock( ), intUnlock( )

logLib
	

logMsg( )

lstLib
	

All routines except lstFree( )

mathALib
	

All routines, if fppSave( )/fppRestore( ) are used

msgQLib
	

msgQSend( )

rngLib
	

All routines except rngCreate( ) and rngDelete( )

pipeDrv
	

write( )

selectLib
	

selWakeup( ), selWakeupAll( )

semLib
	

semGive( ) except mutual-exclusion semaphores, semFlush( )

semPxLib
	

sem_post( )

sigLib
	

kill( )

taskLib
	

taskSuspend( ), taskResume( ), taskPrioritySet( ), taskPriorityGet( ), taskIdVerify( ), taskIdDefault( ), taskIsReady( ), taskIsSuspended( ), taskIsPended( ), taskIsDelayed( ), taskTcb( )

tickLib
	

tickAnnounce( ), tickSet( ), tickGet( )

tyLib
	

tyIRd( ), tyITx( )

vxLib
	

vxTas( ), vxMemProbe( )

wdLib
	

wdStart( ), wdCancel( )
References:
2 MAXv problems Jens . Eden
Re: 2 MAXv problems Ron Sluiter
Re: 2 MAXv problems Jens . Eden
Re: 2 MAXv problems Ron Sluiter
Re: 2 MAXv problems Ron Sluiter
Re: 2 MAXv problems Dirk Zimoch
Re: 2 MAXv problems Eric Norum

Navigate by Date:
Prev: Re: IP asyn timeout connection Dominique Touchard
Next: RE: Building StreamDevice 2-4 / SynApps / Win32 Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: 2 MAXv problems Eric Norum
Next: Re: 2 MAXv problems Joachim Rahn
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·