
Dear Scott McNutt,
In message 4DDFA206.5050101@psyent.com you wrote:
Besides, Nios can return an increment of 10 (presumably ms) between two immediately consecutive calls. This causes early timeouts in CFI driver
...
And this is what reset_timer() corrected.
I cannot see how reset_timer() could ever correct the bug that two seuccessive calls to get_timer() return an delta of 10 milliseconds?
Agreed, but that is not something I can achieve - I don't want to hold up this whole show that we have all put so much effort into for the sake of one weak function
And I don't want to see something that currently works become broken because we "improved" a feature ... simply because the resolution of the timestamp is 10 msec rather than 1 msec.
We agree on that. Yet, an implementation with a resolution of 10 milliseconds must only return a new values (incremented by ten missiseconds) after (at least) 10 milliseconds have passed.
What I've been told is that this condition is violated in the code, which would be a bug that needs to be fixed.
And just to be clear. This is not a Nios issue. Currently, if the timestamp is incremented via a fixed period interrupt, and the period of the interrupt is longer that 1 msec, calls to get_timer() may produce early timeouts ... regardless of platform.
Please point out which other implementations show this problem, too, so we can fix these as well.
Best regards,
Wolfgang Denk