diff options
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/timerimpl.h')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/timerimpl.h | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/timerimpl.h b/cpukit/rtems/include/rtems/rtems/timerimpl.h index b695d5e2fe..e5b37aa5f1 100644 --- a/cpukit/rtems/include/rtems/rtems/timerimpl.h +++ b/cpukit/rtems/include/rtems/rtems/timerimpl.h @@ -50,9 +50,9 @@ extern "C" { typedef struct Timer_server_Control Timer_server_Control; /** - * @brief Method used to schedule the insertion of task based timers. + * @brief Method used for task based timers. */ -typedef void (*Timer_server_Schedule_operation)( +typedef void (*Timer_server_Method)( Timer_server_Control *timer_server, Timer_Control *timer ); @@ -65,28 +65,52 @@ 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; + Watchdog_Interval last_snapshot; + + /** + * @brief Current time snapshot of the timer server. + * + * The units may be ticks or seconds. + */ + Watchdog_Interval current_snapshot; } Timer_server_Watchdogs; struct Timer_server_Control { /** - * @brief Timer server thread. + * @brief The cancel method of the timer server. */ - Thread_Control *thread; + Timer_server_Method cancel; /** * @brief The schedule operation method of the timer server. */ - Timer_server_Schedule_operation schedule_operation; + Timer_server_Method schedule_operation; /** * @brief Interval watchdogs triggered by the timer server. @@ -97,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; }; /** @@ -220,6 +224,8 @@ RTEMS_INLINE_ROUTINE bool _Timer_Is_dormant_class ( return ( the_class == TIMER_DORMANT ); } +void _Timer_Cancel( Timer_Control *the_timer ); + /**@}*/ #ifdef __cplusplus |