diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-08-17 22:49:56 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-08-17 22:49:56 +0000 |
commit | 55e012993ca8e7ee9bf38d53158db7bc56b815b4 (patch) | |
tree | 99927b48729584a5dc14bbb9aa83c632f8ab7b72 /cpukit/score | |
parent | New file. (diff) | |
download | rtems-55e012993ca8e7ee9bf38d53158db7bc56b815b4.tar.bz2 |
2005-08-17 Andrew Sinclair <Andrew.Sinclair@elprotech.com>
PR 807/rtems
* rtems/src/timerfireafter.c, rtems/src/timerserverfireafter.c,
score/src/watchdoginsert.c: Tighten critical section checks on an ISR
using the same timer being inserted by a lower priority ISR or
interupt task.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/src/watchdoginsert.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cpukit/score/src/watchdoginsert.c b/cpukit/score/src/watchdoginsert.c index 6bda69adde..9fcbcba1d1 100644 --- a/cpukit/score/src/watchdoginsert.c +++ b/cpukit/score/src/watchdoginsert.c @@ -40,10 +40,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: |