From 08bd7d36cee1b041d54ee9dbace86a1b810938af Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 12 Nov 2019 09:33:41 -0600 Subject: Add TOD Hooks to allow BSP to take action when TOD is set Two use cases were envisioned for this. 1) a BSP or application which desires to update a real-time clock when the RTEMS TOD is set. 2) a paravirtualized BSP can use this to propagate setting the time in an RTEMS application to the hosting environment. This enables the entire set of applications in the virtualized environments to have a single consistent TOD. --- cpukit/include/rtems/score/timecounter.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpukit/include/rtems/score/timecounter.h') diff --git a/cpukit/include/rtems/score/timecounter.h b/cpukit/include/rtems/score/timecounter.h index 78f5dfa53b..b71ccd3948 100644 --- a/cpukit/include/rtems/score/timecounter.h +++ b/cpukit/include/rtems/score/timecounter.h @@ -201,6 +201,16 @@ ISR_LOCK_DECLARE( extern, _Timecounter_Lock ) #define _Timecounter_Acquire( lock_context ) \ _ISR_lock_ISR_disable_and_acquire( &_Timecounter_Lock, lock_context ) +/** + * @brief Releases the timecounter lock. + * + * @param lock_context The lock context. + * + * See _Timecounter_Tick_simple(). + */ +#define _Timecounter_Release(lock_context) \ + _ISR_lock_Release_and_ISR_enable(&_Timecounter_Lock, lock_context) + /** * @brief Performs a simple timecounter tick. * -- cgit v1.2.3