diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-02-07 16:10:45 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-02-21 14:16:41 +0100 |
commit | 8f1e8f8f26525a8819c8982a2d2c4e339e9921a0 (patch) | |
tree | 956a3d8c2a516e39c7ac84cd5388ccdd150e756c /cpukit/include | |
parent | kern_ntptime.c: Import from FreeBSD (diff) | |
download | rtems-8f1e8f8f26525a8819c8982a2d2c4e339e9921a0.tar.bz2 |
kern_ntptime.c: Port to RTEMS
Remove previous adjtime() implementation.
Update #2348.
Diffstat (limited to '')
-rw-r--r-- | cpukit/include/rtems/score/timecounter.h | 9 | ||||
-rw-r--r-- | cpukit/include/sys/timex.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/cpukit/include/rtems/score/timecounter.h b/cpukit/include/rtems/score/timecounter.h index 39f0dc353e..954da65676 100644 --- a/cpukit/include/rtems/score/timecounter.h +++ b/cpukit/include/rtems/score/timecounter.h @@ -270,6 +270,15 @@ void _Timecounter_Set_NTP_update_second( Timecounter_NTP_update_second handler ); +/** + * @brief Updates the time adjustment and seconds according to the NTP state. + * + * @param[in, out] adjustment is the NTP time adjustment. + * + * @param[in, out] newsec is the number of seconds since Unix epoch. + */ +void _Timecounter_NTP_update_second(int64_t *adjustment, time_t *newsec); + /** @} */ #ifdef __cplusplus diff --git a/cpukit/include/sys/timex.h b/cpukit/include/sys/timex.h index d2d2012ff5..8e763bb30f 100644 --- a/cpukit/include/sys/timex.h +++ b/cpukit/include/sys/timex.h @@ -37,7 +37,7 @@ #define NTP_API 4 /* NTP API version */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__rtems__) #include <sys/_timespec.h> #endif /* __FreeBSD__ */ @@ -153,7 +153,7 @@ struct timex { long stbcnt; /* stability limit exceeded (ro) */ }; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__rtems__) #ifdef _KERNEL void ntp_update_second(int64_t *adjustment, time_t *newsec); |