v01d commented on pull request #1726: URL: https://github.com/apache/incubator-nuttx/pull/1726#issuecomment-687974714
@patacongo ok, I see why this is now, there's a "hack" in place that keeps the timer running. I don't really understand the explanation. I guess it refers to a possible race condition. Should we open an issue for this so that one day we can improve it? Disabling the scheduling interrupt when not needed can go a long way for low-power applications. <pre> /* In the original design, it was planned that nxsched_reassess_timer() be * called whenever there was a change at the head of the ready-to-run * list. That call was intended to establish a new time-slice or to * stop an old time-slice timer. However, it turns out that that * solution is too fragile: The system is too vulnerable at the time * that the ready-to-run list is modified in order to muck with timers. * * The kludge/work-around is simple to keep the timer running all of the * time with an interval of no more than the timeslice interval. If we * do this, then there is really no need to do anything when on context * switches. */ #define KEEP_ALIVE_HACK 1 </pre> ---------------------------------------------------------------- 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: us...@infra.apache.org