diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-06-13 11:39:43 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-06-14 14:20:30 +0200 |
commit | c34bb0dcfa8ba1294cd5182349e1ddbe34f81bf4 (patch) | |
tree | 249469ef52fd9829a59ca914322805c351267da1 /cpukit/score/include/rtems/score/tod.h | |
parent | score: New structure TOD_Control (diff) | |
download | rtems-c34bb0dcfa8ba1294cd5182349e1ddbe34f81bf4.tar.bz2 |
score: Fix performance issue for 64-bit timestamps
The 64-bit timestamps were introduced to simplify the timestamp
calculations. This works well since nearly all operations are
additions. The previous _TOD_Tickle_ticks() implementation had a
serious performance regression in case of 64-bit timestamps due to the
usage of two 64-bit divisions which are quite expensive on some
architectures.
A new field seconds_trigger in TOD_Control is introduced to trigger the
_Watchdog_Tickle_seconds() in _TOD_Tickle_ticks(). This avoids the
64-bit divisions completely and only 32-bit additions are used.
Diffstat (limited to 'cpukit/score/include/rtems/score/tod.h')
-rw-r--r-- | cpukit/score/include/rtems/score/tod.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/tod.h b/cpukit/score/include/rtems/score/tod.h index 06cc9003dd..cfb0fe776d 100644 --- a/cpukit/score/include/rtems/score/tod.h +++ b/cpukit/score/include/rtems/score/tod.h @@ -137,6 +137,15 @@ typedef struct { Timestamp_Control uptime; /** + * @brief Time of day seconds trigger. + * + * This value specifies the nanoseconds since the last time of day second. + * It is updated and evaluated in _TOD_Tickle_ticks(). It is set in + * _TOD_Set_with_timestamp(). + */ + uint32_t seconds_trigger; + + /** * @brief Indicates if the time of day is set. * * This is true if the application has set the current |