[Xenomai] Xenomai 3.0.5 - sigwaitinfo si_overrun wrong value
rpm at xenomai.org
Fri Oct 27 19:51:14 CEST 2017
On 10/26/2017 03:56 PM, Fazio Maurizio wrote:
> sprintf (buffer, "%ld s %ld ns - %ld s %ld ns overrun = %d\n",tp.tv_sec,
> tp.tv_nsec, diffTime.tv_sec,diffTime.tv_nsec, siginfo.si_overrun);
> write (STDOUT_FILENO, buffer, strlen (buffer));
Bad, will switch the caller to secondary mode.
> if (counter % 3 == 0)
Ditto with 3.0.5.
Excerpt from the timer_getoverrun() manpage:
"The timer overrun count is the number of additional timer expirations
that occurred between the time when the signal was generated and when it
was delivered or accepted."
So you need to delay for at least two intervals before receiving a
non-zero overrun count.
You may want to check this building your code over the plain glibc.
usleep(1500) gives no overruns, usleep(2000) gives 1, usleep(3000) gives
2 and so on.
More information about the Xenomai