diff options
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/score/src/corespinlockwait.c | 24 |
2 files changed, 20 insertions, 10 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 90672e1f76..ca5845200d 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +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. + 2009-06-10 Joel Sherrill <joel.sherrill@oarcorp.com> * sapi/include/confdefs.h: Fix minor error when application has its own 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 |