diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-11 15:18:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-06-11 15:18:08 +0000 |
commit | 34e648791e9cf3b5cee393359adad083f1438549 (patch) | |
tree | 3db1514e527d89e8dab8ffaca5946be704430719 /cpukit/score/src/corespinlockwait.c | |
parent | 2009-06-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-34e648791e9cf3b5cee393359adad083f1438549.tar.bz2 |
2009-06-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/src/corespinlockwait.c: Mark timeout code which is not
currently exercised by any API with the
FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API conditional.
Diffstat (limited to 'cpukit/score/src/corespinlockwait.c')
-rw-r--r-- | cpukit/score/src/corespinlockwait.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/cpukit/score/src/corespinlockwait.c b/cpukit/score/src/corespinlockwait.c index ef3bb43fb8..4fb49badd7 100644 --- a/cpukit/score/src/corespinlockwait.c +++ b/cpukit/score/src/corespinlockwait.c @@ -1,7 +1,7 @@ /* * SuperCore Spinlock Handler -- Wait for Spinlock * - * COPYRIGHT (c) 1989-2006. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -43,7 +43,9 @@ CORE_spinlock_Status _CORE_spinlock_Wait( ) { ISR_Level level; - Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; + #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) + Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; + #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && @@ -69,14 +71,16 @@ CORE_spinlock_Status _CORE_spinlock_Wait( return CORE_SPINLOCK_UNAVAILABLE; } - /* - * They are willing to wait but there could be a timeout. - */ - if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { - the_spinlock->users -= 1; - _ISR_Enable( level ); - return CORE_SPINLOCK_TIMEOUT; - } + #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) + /* + * They are willing to wait but there could be a timeout. + */ + if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { + the_spinlock->users -= 1; + _ISR_Enable( level ); + return CORE_SPINLOCK_TIMEOUT; + } + #endif /* * The thread is willing to spin so let's set things up so |