![]() |
![]() ![]()
Experimental Physics and
| ||||||||||||||
|
"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. 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( )
| ||||||||||||||
ANJ, 02 Sep 2010 |
![]() · Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |