From 95c747d9e71d4d385cfed0554c9dadfa76c44491 Mon Sep 17 00:00:00 2001 From: Gabriel Moyano Date: Fri, 20 May 2022 11:29:56 +0200 Subject: kern_tc.c: Replace FreeBSD event mechanism by adding pointers to function Update #2349. --- cpukit/include/sys/timepps.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'cpukit/include') diff --git a/cpukit/include/sys/timepps.h b/cpukit/include/sys/timepps.h index 5703381ffa..2513298557 100644 --- a/cpukit/include/sys/timepps.h +++ b/cpukit/include/sys/timepps.h @@ -164,6 +164,30 @@ struct pps_state { int ppscap; struct timecounter *ppstc; unsigned ppscount[3]; +#ifdef __rtems__ + /** + * @brief Wait for an event. + * + * Called internally when time_pps_fetch() is used. + * It is initialized by pps_init() to a handler which just returns ETIMEDOUT. + * + * @param pps is the pointer to the object. + * + * @param timeout + * + * @retval 0 A wakeup event was received. + * + * @retval ETIMEDOUT A timeout occurred while waiting for the event. + */ + int (*wait)(struct pps_state *pps, struct timespec timeout); + + /** + * @brief Wakeup the tasks waiting for an event. + * + * @param pps is the pointer to the object. + */ + void (*wakeup)(struct pps_state *pps); +#endif /* __rtems__ */ /* * The following fields are valid if the driver calls pps_init_abi(). */ -- cgit v1.2.3