v01d commented on pull request #1726:
URL: https://github.com/apache/incubator-nuttx/pull/1726#issuecomment-687916500


   > > Well, that k,ind of makes sense. In Tickless mode, the OS sets the 
interval timer, then waits for the timer expiration which calls 
`nxsched_alarm_expiration()` to process the timer expiration. Since it does 
need an event to get started. But I don't recall having done that with other 
architectures.
   > 
   > So I really misspoke here when I said: "it does need an event to get 
started". The event the normally causes the interval timer to be started is 
calling something like wd_start().
   
   The problem is that, at least for TICKLESS_ALARM, there is a `g_stop_time` 
variable which starts at zero and is set on `nxsched_alarm_expiration`. And 
this is used to construct the absolute time for the alarm (like `g_stop_time + 
sleep_time`) and if the first call to `nxsched_alarm_expiration` does not occur 
immediately on start, the absolute time of the first alarm will be equal to 
`sleep_time` which is a time in the past.


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

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


Reply via email to