summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/watchdoginsert.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/watchdoginsert.c')
-rw-r--r--cpukit/score/src/watchdoginsert.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/cpukit/score/src/watchdoginsert.c b/cpukit/score/src/watchdoginsert.c
index 4e921e28c8..5dfea56a46 100644
--- a/cpukit/score/src/watchdoginsert.c
+++ b/cpukit/score/src/watchdoginsert.c
@@ -36,10 +36,20 @@ void _Watchdog_Insert(
insert_isr_nest_level = _ISR_Nest_level;
- the_watchdog->state = WATCHDOG_BEING_INSERTED;
_ISR_Disable( level );
+ /*
+ * Check to see if the watchdog has just been inserted by a
+ * higher priority interrupt. If so, abandon this insert.
+ */
+
+ if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
+ _ISR_Enable( level );
+ return;
+ }
+
+ the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart: