summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/timecounter.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2019-11-12 09:33:41 -0600
committerJoel Sherrill <joel@rtems.org>2019-12-11 15:22:33 -0600
commit08bd7d36cee1b041d54ee9dbace86a1b810938af (patch)
tree18de7bd20167d7430c82810d375534c56dfedb91 /cpukit/include/rtems/score/timecounter.h
parentpipe: Use condition variables (diff)
downloadrtems-08bd7d36cee1b041d54ee9dbace86a1b810938af.tar.bz2
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.
Diffstat (limited to 'cpukit/include/rtems/score/timecounter.h')
-rw-r--r--cpukit/include/rtems/score/timecounter.h10
1 files changed, 10 insertions, 0 deletions
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
@@ -202,6 +202,16 @@ ISR_LOCK_DECLARE( extern, _Timecounter_Lock )
_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.
*
* This is a special purpose tick function for simple timecounter to support