EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: About: timeout handler of epicsTimer
From: Andrew Johnson <[email protected]>
To: Jun-ichi Odagiri <[email protected]>
Cc: "'EPICS tech-talk'" <[email protected]>
Date: Thu, 12 Jan 2006 18:02:18 -0600
Jun-ichi Odagiri wrote:

I'm wondering if the following statement about epicsTimer is correct or not.


#Start of the statement
Any handler of epicsTimer runs, when the timer expired, not in an interrupt
context but in a normal task's (thread's) context.
This goes for the case where the iocCore program is running on vxWorks or
RTEMS, or whatever OS supported in Base.
#End of the statement

Your statement is true; unlike the old vxWorks watchdog timers that we used to use in iocCore before the OSI layer was added, an epicsTimer's notify routine or callback is now always executed in thread context.


What I'd like to know is, in other words, if a handler of epicsTimer is
allowed to take semaphores in the handler or not.

I guess the statement is TRUE because I have found an example of a handler
to call printf, in "IOC Application Developer's Guide (Chp.19, Section
10.4)".

Yes it is allowed, but you should be aware of the implications of this: If the semaphore blocks, then none of the other epicsTimers that use the same epicsTimerQueue will be executed until the semaphore is released and the callback/notify routine returns. It is not advisable for a timer on the system shared timer queue to block for any signficant period of time in its callback/notify routine. The use of printf() and similar functions is fine though because it should not block for any significant period of time.


- Andrew
--
* * Matt Santos / / For a Brighter America * *

Replies:
RE: About: timeout handler of epicsTimer Jun-ichi Odagiri
References:
About: timeout handler of epicsTimer Jun-ichi Odagiri

Navigate by Date:
Prev: EPICS CA security with the motorRecord? Ernest L. Williams Jr.
Next: RE: About: timeout handler of epicsTimer Jun-ichi Odagiri
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: About: timeout handler of epicsTimer Jun-ichi Odagiri
Next: RE: About: timeout handler of epicsTimer Jun-ichi Odagiri
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  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 ·