diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-08-17 22:50:30 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-08-17 22:50:30 +0000 |
commit | f45e8840c81f5534e0d2a998f271024bd213d607 (patch) | |
tree | 94e91af6b3415391c804de77f26a11c34799a168 /cpukit/score | |
parent | 2005-08-17 Nickolay Semyonov <snob@oktetlabs.ru> (diff) | |
download | rtems-f45e8840c81f5534e0d2a998f271024bd213d607.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/ChangeLog | 8 | ||||
-rw-r--r-- | cpukit/score/src/watchdoginsert.c | 12 |
2 files changed, 19 insertions, 1 deletions
diff --git a/cpukit/score/ChangeLog b/cpukit/score/ChangeLog index f1fe0f362c..19ada3cc3e 100644 --- a/cpukit/score/ChangeLog +++ b/cpukit/score/ChangeLog @@ -1,3 +1,11 @@ +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. + 2005-05-13 Jennifer Averett <jennifer.averett@oarcorp.com> PR 786/rtems 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: |