v01d commented on pull request #1726: URL: https://github.com/apache/incubator-nuttx/pull/1726#issuecomment-688888715
> > @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. > > Use of almost all internal OS interfaces require that the OS data structures always be in the correct state. During a context switch that internal state for one task is torn down and the new state for the news task is set up. In between those times, the OS is in an indeterminate state and the use of any OS internal interface (such as the timer interface) may not be reliable. > > I don't recall the specific issue that I faced when I wrote that comment, but I do remember that there was no simple work-around. It is, however, certainly worth revisiting if someone is motivated to really dig into the guts of the OS. Thanks. I will create an issue for this. I could make an attempt to solve it eventually. ---------------------------------------------------------------- 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