EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: epicsTimer and rounding
From: Eric Norum <[email protected]>
To: Ralph Lange <[email protected]>
Cc: EPICS Core Talk <[email protected]>, Dirk Zimoch <[email protected]>
Date: Fri, 8 Jun 2012 08:55:35 -0700
So what what's your recommendation for an RTEMS implementation of epicsThreadSleep?  
Constraints:
- Minimize floating point
- Don't make delays longer than necessary.  I'd expand your "0.0 doesn't sleep one quantum" to "epicsThreadSleep(N*epicsThreadSleepQuantum()) should call the underlying OS delay routine for a N-tick delay -- not N+1 ticks".

On Jun 8, 2012, at 8:04 AM, Ralph Lange wrote:


IMHO:
1. epicsTimer should not round.
2. epicsThreadSleep should always round up, following usual sleep/pause/nap/delay semantics, without forcing a sleep of one quantum when 0.0 is requested.
This matches the existing API specification. Currently, Windows, vxWorks, and RTEMS implementations do not follow the API spec, the posic implementation is correct.
2. The epicsTimer behaviour should be documented.
3. An application that wants statistically optimized delays may subtract half a quantum when setting up the epicsTimer. This should be mentioned in the documentation, and scan threads, ca beacons etc. should use this method. (Maybe add a "statistically more accurate" variant of the start method to the epicsTimer API for convenience.)

Cheers,
Ralph


-- 
Eric Norum
[email protected]





Replies:
Re: epicsTimer and rounding Eric Norum
References:
epicsTimer and rounding Ralph Lange
RE: epicsTimer and rounding Hill, Jeff
Re: epicsTimer and rounding Ralph Lange
Re: epicsTimer and rounding Eric Norum
RE: epicsTimer and rounding Hill, Jeff
Re: epicsTimer and rounding Ralph Lange

Navigate by Date:
Prev: RE: epicsTimer and rounding Hill, Jeff
Next: Re: epicsTimer and rounding Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: epicsTimer and rounding Ralph Lange
Next: Re: epicsTimer and rounding Eric Norum
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024