[PATCH 2/3] Add hook for BSP to act when time is set
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Oct 7 08:15:56 UTC 2019
On 04/10/2019 17:08, Joel Sherrill wrote:
> I can't conceive of a use case where you would need more than one hook set.
> Do you have something in mind?
>
> The int returned may need to be an enum so there is a list of known
> failures which
> can be mapped to API specific errors.
>
> Any ideas on the new API to register with? Whether it is one hook or a
> set, we will
> need an API. Is this part of the rtems_clock_ APIs? or something like
> rtems_tod_register_hooks() and unregister? I'm having trouble putting a
> name on
> the API.
>
> The way I implemented this, it was not called in non-paravirtualized
> environments and
> required to be provided by the BSP in paravirtualized environments. It
> was quite
> simple.
>
> I'm happy to move to a register type interface. Just want help in
> defining requirements and
> API specifications.
The hook infrastructure needs to be testable. Your v1 patch added
untestable code paths non-paravirtualized environments. A generalization
of the API is easy and may be beneficial in the future (e.g. use in RTC
drivers). At the moment I don't see a need for a public API. We can add
a wrapper later if necessary.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list