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: "Jun-ichi Odagiri" <[email protected]>
To: "'EPICS tech-talk'" <[email protected]>
Date: Fri, 13 Jan 2006 09:45:28 +0900
Dear Andrew

>> 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.

I got it.
I'm going to use a semaphore just to make a few lines of code atomic in an
epicsTimer handler.
No further blocking call is in the critical section protected by the
semaphore.
So, it should be fine.
Things are now crystal-clear to me.
Thanks a lot for your comments and advice.

Jun-ichi


References:
Re: About: timeout handler of epicsTimer Andrew Johnson

Navigate by Date:
Prev: Re: About: timeout handler of epicsTimer Andrew Johnson
Next: RE: About: timeout handler of epicsTimer Mark Rivers
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: Re: About: timeout handler of epicsTimer Andrew Johnson
Next: RE: About: timeout handler of epicsTimer Mark Rivers
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 ·