diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-11-09 09:14:10 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-11-09 09:14:10 +0000 |
commit | 42d6ed845ad601964241098cdf829b476dd04721 (patch) | |
tree | e9f9567768c346628aae0bc0729445ab9d5fad35 | |
parent | 2010-11-06 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-42d6ed845ad601964241098cdf829b476dd04721.tar.bz2 |
2010-11-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/src/watchdoginsert.c: Removed superfluous cast and use
appropriate API function. This special case handling is obsolete
since 2006 with the introduction of compiler memory barriers in the
interrupt routines. Removed obsolete comments.
-rw-r--r-- | cpukit/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/score/src/watchdoginsert.c | 25 |
2 files changed, 8 insertions, 24 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index d55bb98d56..2ffceadda2 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2010-11-09 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * score/src/watchdoginsert.c: Removed superfluous cast and use + appropriate API function. This special case handling is obsolete + since 2006 with the introduction of compiler memory barriers in the + interrupt routines. Removed obsolete comments. + 2010-11-04 Joel Sherrill <joel.sherrill@oarcorp.com> * libmisc/stackchk/check.c: Make compile again. diff --git a/cpukit/score/src/watchdoginsert.c b/cpukit/score/src/watchdoginsert.c index 9fcbcba1d1..e4b86bd271 100644 --- a/cpukit/score/src/watchdoginsert.c +++ b/cpukit/score/src/watchdoginsert.c @@ -59,21 +59,7 @@ void _Watchdog_Insert( restart: delta_interval = the_watchdog->initial; - /* - * We CANT use _Watchdog_First() here, because a TICK interrupt - * could modify the chain during the _ISR_Flash() below. Hence, - * the header is pointing to volatile data. The _Watchdog_First() - * INLINE routine (but not the macro - note the subtle difference) - * casts away the 'volatile'... - * - * Also, this is only necessary because we call no other routine - * from this piece of code, hence the compiler thinks it's safe to - * cache *header!! - * - * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) - * - */ - for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; + for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { @@ -87,15 +73,6 @@ restart: delta_interval -= after->delta_interval; - /* - * If you experience problems comment out the _ISR_Flash line. - * 3.2.0 was the first release with this critical section redesigned. - * Under certain circumstances, the PREVIOUS critical section algorithm - * used around this flash point allowed interrupts to execute - * which violated the design assumptions. The critical section - * mechanism used here WAS redesigned to address this. - */ - _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { |