diff options
author | Gabriel Moyano <gabriel.moyano@dlr.de> | 2022-05-20 11:29:56 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-23 09:08:50 +0200 |
commit | 95c747d9e71d4d385cfed0554c9dadfa76c44491 (patch) | |
tree | 4754bbf64ba1773578b0cc23d3b0673eca993d54 /cpukit/include | |
parent | kern_tc.c: Add atomic dependencies required by the PPS API (diff) | |
download | rtems-95c747d9e71d4d385cfed0554c9dadfa76c44491.tar.bz2 |
kern_tc.c: Replace FreeBSD event mechanism by adding pointers to function
Update #2349.
Diffstat (limited to 'cpukit/include')
-rw-r--r-- | cpukit/include/sys/timepps.h | 24 |
1 files changed, 24 insertions, 0 deletions
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(). */ |