summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/timerimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-10 15:31:31 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-05-19 12:00:43 +0200
commita382010c62455df73552eb5f0baa1faebe9702c7 (patch)
tree32764a1f1ce7aec8cd5dce3bf4a363ec4c2de179 /cpukit/rtems/include/rtems/rtems/timerimpl.h
parentscore: Move _Watchdog_Tickle() (diff)
downloadrtems-a382010c62455df73552eb5f0baa1faebe9702c7.tar.bz2
score: New timer server implementation
Use mostly the standard watchdog operations. Use a system event for synchronization. This implementation is simpler and offers better SMP performance. Close #2131.
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/timerimpl.h')
-rw-r--r--cpukit/rtems/include/rtems/rtems/timerimpl.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/timerimpl.h b/cpukit/rtems/include/rtems/rtems/timerimpl.h
index 4f200efb75..e5b37aa5f1 100644
--- a/cpukit/rtems/include/rtems/rtems/timerimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/timerimpl.h
@@ -65,24 +65,43 @@ typedef struct {
Watchdog_Control System_watchdog;
/**
+ * @brief Remaining delta of the system watchdog.
+ */
+ Watchdog_Interval system_watchdog_delta;
+
+ /**
+ * @brief Unique identifier of the context which deals currently with the
+ * system watchdog.
+ */
+ Thread_Control *system_watchdog_helper;
+
+ /**
+ * @brief Each insert and tickle operation increases the generation count so
+ * that the system watchdog dealer notices updates of the watchdog chain.
+ */
+ uint32_t generation;
+
+ /**
* @brief Watchdog header managed by the timer server.
*/
Watchdog_Header Header;
/**
- * @brief Last known time snapshot of the timer server.
+ * @brief Last time snapshot of the timer server.
*
* The units may be ticks or seconds.
*/
- Watchdog_Interval volatile last_snapshot;
-} Timer_server_Watchdogs;
+ Watchdog_Interval last_snapshot;
-struct Timer_server_Control {
/**
- * @brief Timer server thread.
+ * @brief Current time snapshot of the timer server.
+ *
+ * The units may be ticks or seconds.
*/
- Thread_Control *thread;
+ Watchdog_Interval current_snapshot;
+} Timer_server_Watchdogs;
+struct Timer_server_Control {
/**
* @brief The cancel method of the timer server.
*/
@@ -102,26 +121,6 @@ struct Timer_server_Control {
* @brief TOD watchdogs triggered by the timer server.
*/
Timer_server_Watchdogs TOD_watchdogs;
-
- /**
- * @brief Chain of timers scheduled for insert.
- *
- * This pointer is not @c NULL whenever the interval and TOD chains are
- * processed. After the processing this list will be checked and if
- * necessary the processing will be restarted. Processing of these chains
- * can be only interrupted through interrupts.
- */
- Chain_Control *volatile insert_chain;
-
- /**
- * @brief Indicates that the timer server is active or not.
- *
- * The server is active after the delay on a system watchdog. The activity
- * period of the server ends when no more watchdogs managed by the server
- * fire. The system watchdogs must not be manipulated when the server is
- * active.
- */
- bool volatile active;
};
/**