diff options
author | Gedare Bloom <gedare@rtems.org> | 2016-06-09 11:33:15 -0400 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2016-07-25 12:44:47 -0400 |
commit | f23d4706169d68d3c4e90b297650f89c272716f4 (patch) | |
tree | 333bdc4b4be2ec4ad7ee80ee03229759ec60602a /cpukit/score/include/rtems/score/watchdog.h | |
parent | score: Fix for RTEMS_DEBUG (diff) | |
download | rtems-f23d4706169d68d3c4e90b297650f89c272716f4.tar.bz2 |
cpukit: Add and use Watchdog_Discipline.
Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE,
or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with
a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline
of WATCHDOG_NO_TIMEOUT.
updates #2732
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/watchdog.h | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/cpukit/score/include/rtems/score/watchdog.h b/cpukit/score/include/rtems/score/watchdog.h index c582dbd1ae..11a5974c26 100644 --- a/cpukit/score/include/rtems/score/watchdog.h +++ b/cpukit/score/include/rtems/score/watchdog.h @@ -53,6 +53,38 @@ typedef struct Watchdog_Control Watchdog_Control; typedef uint32_t Watchdog_Interval; /** + * @brief The clock discipline to use for the Watchdog timeout interval. + */ +typedef enum { + + /** + * @brief Indefinite wait. + * + * This is to indicate there is no timeout and not to use a watchdog. It + * must be equal to 0, which is an illegal relative clock interval, so that + * it may be used as a Watchdog_Interval value with WATCHDOG_RELATIVE to + * express an indefinite wait. + */ + WATCHDOG_NO_TIMEOUT = 0, + + /** + * @brief Relative clock. + * + * The reference time point for the watchdog is current ticks value + * during insert. Time is measured in clock ticks. + */ + WATCHDOG_RELATIVE, + + /** + * @brief Absolute clock. + * + * The reference time point for this header is the POSIX Epoch. Time is + * measured in nanoseconds since POSIX Epoch. + */ + WATCHDOG_ABSOLUTE +} Watchdog_Discipline; + +/** * @brief Return type from a Watchdog Service Routine. * * This type defines the return type from a Watchdog Service Routine. @@ -68,14 +100,6 @@ typedef Watchdog_Service_routine ( *Watchdog_Service_routine_entry )( Watchdog_Control * ); /** - * @brief The constant for indefinite wait. - * - * This is the constant for indefinite wait. It is actually an - * illegal interval. - */ -#define WATCHDOG_NO_TIMEOUT 0 - -/** * @brief The watchdog header to manage scheduled watchdogs. */ typedef struct { |