On Wed, 2019-07-24 at 13:08 -0700, Michael Davidsaver via Core-talk wrote:
> On 7/24/19 1:02 PM, Johnson, Andrew N. via Core-talk wrote:
> > I don't think anyone has suggested using clock_getres() for the quantum value before; that might be a better solution than just returning zero. Anyone else want to weigh in on that idea — should we just apply Dirk's patch?
>
> cf. the posix version of epicsMonotonicResolution()
>
> I've never looked at what is returned for CLOCK_REALTIME (which is always present).
>
> I think the ultimate fallback has to be returning zero. 1e-3 is too arbitrary.
1e-3 is not completely arbitrary. periodicTask uses epicsEventWaitWithTimeout to
sleep which calls convertDoubleToWakeTime. The posix implementation of
convertDoubleToWakeTime uses gettimeofday if CLOCK_REALTIME is not present.
gettimeofday uses struct timeval which has only microsecond resolution.
Thus on systems where CLOCK_REALTIME does not exist, 1e-3 makes some sense.
However if there are no such posix systems, then the compiler branched can be
removed.
The posix epicsThreadSleep implementation on the other hand uses nanosleep and
is thus not limited to milliseconds.
Dirk
- References:
- Misleading "initPeriodic: Scan rate ... is not achievable" and sleep quantum implementation Zimoch Dirk (PSI) via Core-talk
- Re: Misleading "initPeriodic: Scan rate ... is not achievable" and sleep quantum implementation Zimoch Dirk (PSI) via Core-talk
- Re: Misleading "initPeriodic: Scan rate ... is not achievable" and sleep quantum implementation Johnson, Andrew N. via Core-talk
- Re: Misleading "initPeriodic: Scan rate ... is not achievable" and sleep quantum implementation Michael Davidsaver via Core-talk
- Navigate by Date:
- Prev:
Jenkins build is still unstable: epics-7.0 » mac #137 APS Jenkins via Core-talk
- Next:
Build failed: epics-base base-7.0-277 AppVeyor via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Misleading "initPeriodic: Scan rate ... is not achievable" and sleep quantum implementation Michael Davidsaver via Core-talk
- Next:
EPICS 7 array link inconsistencies Zimoch Dirk (PSI) via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|