Inconsistent behaviour with respect to the ticks in the *_when() directives

Gedare Bloom gedare at rtems.org
Fri May 14 14:41:15 UTC 2021


On Fri, May 14, 2021 at 12:26 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> Hello,
>
> I noticed that we have an inconsistent behaviour with respect to the
> handling of the ticks member in the *_when() directives. In all *_when()
> directives the ticks member is not used to calculate the watchdog
> expiration time, see also:
>
> https://lists.rtems.org/pipermail/users/2020-December/068006.html
>
> However, the rtems_task_wake_when() directive ignores the ticks member
> of the time of day completely, unlike the rtems_timer_fire_when() and
> rtems_timer_server_fire_when() directives which check that the ticks are
> valid and then ignore them.
>
> We should use a common way to deal with the ticks member. If we ignore
> the value, then this would make it more difficult to support it in the
> future. The watchdog implementation supports a nanoseconds resolution.
> If we check the ticks in rtems_task_wake_when() existing applications
> may get an error status after the change.
>
I'm in favor of making the behavior consistent and future-looking.
Let's validate the ticks parameter but not use it. Recommend that
users set it to 0? That allows a future modification to use it with
fewer surprises.

> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list