[LITMUS^RT] Running LITMUS-RT on ARM64
Andrii Anisov
andrii_anisov at epam.com
Wed Sep 6 19:18:08 CEST 2017
Björn,
I've realized the origin of rounding error I faced and was trying to
work around. It is the calculation error of this [1] line. Due to the
fact that `0.01` is presented in `double` as a bit bigger value,
consequent substractions delivered an accumulating calculation error.
But I've reconsidered my code to make all loop count calculations in
`double`, and do `double` to `int` conversion right before counted
looping. From one side this shrinks possible calculation error impact
down to one loop time, from other hand, gives us possibility to properly
loop for fractions of ms (i.e. from this code [2]).
Please see an updated PR. Note that I've put the last change as a
separate patch in order to keep it visible for you. Once you are ok with
the code I'll squash that change and provide clean patches for merge.
[1] https://github.com/LITMUS-RT/liblitmus/blob/master/bin/rtspin.c#L241
[2] https://github.com/LITMUS-RT/liblitmus/blob/master/bin/rtspin.c#L282
--
*Andrii Anisov*
More information about the litmus-dev
mailing list