xiaoxiang781216 edited a comment on pull request #5432:
URL: https://github.com/apache/incubator-nuttx/pull/5432#issuecomment-1031276071


   > > > If this change will be rejected I will probably need to implement 
something like http://www.makelinux.net/ldd3/chp-7-sect-4.shtml and base POSIX 
timers and `timerfd` on top of it.
   > > 
   > > 
   > > Linux timer API even with the latest code still suffer the same issue as 
wdog since both use the tick as unit. You should add a new set API like hrtimer 
which use nanosecond unit: 
https://www.kernel.org/doc/html/latest/timers/hrtimers.html. And implement all 
other timer related api on top of hrtimer.
   > > Since the unit of arch(up_alarm_xxx or up_timer_exx) API in tickless 
mode use nanosecond unit, it's very lucky that we don't need introduce the new 
arch API to support the high resolution timer.
   > 
   > The implementation of of high resolution timers will probably need to rely 
on MCU HW timer and will be an optional feature.
   > 
   
   What I mean high resolution is that the software timer(posix timer, timerfd) 
has the same accuracy as the hardware timer. So the developer can select the 
right hardware timer to implement arch_timer_xxx or arch_alarm_xxx API. The 
problem you hit is that wdog accuracy(one tick) is lower than the hardware 
capability.
   
   > Please understand me right. I'm fine if proposed change is rejected by 
community and I'm just trying to find a way to achieve the best possible 
operation for timers functionality because believe that it is the right way of 
doing things.
   
   The best way is what Linux has been done.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to