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.
This commit is contained in:
Joel Sherrill
2009-06-11 15:18:08 +00:00
parent fe484f7d2e
commit 34e648791e
2 changed files with 20 additions and 10 deletions

View File

@@ -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> 2009-06-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/confdefs.h: Fix minor error when application has its own * sapi/include/confdefs.h: Fix minor error when application has its own

View File

@@ -1,7 +1,7 @@
/* /*
* SuperCore Spinlock Handler -- Wait for Spinlock * SuperCore Spinlock Handler -- Wait for Spinlock
* *
* COPYRIGHT (c) 1989-2006. * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).
* *
* The license and distribution terms for this file may be * The license and distribution terms for this file may be
@@ -43,7 +43,9 @@ CORE_spinlock_Status _CORE_spinlock_Wait(
) )
{ {
ISR_Level level; ISR_Level level;
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
#endif
_ISR_Disable( level ); _ISR_Disable( level );
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
@@ -69,6 +71,7 @@ CORE_spinlock_Status _CORE_spinlock_Wait(
return CORE_SPINLOCK_UNAVAILABLE; return CORE_SPINLOCK_UNAVAILABLE;
} }
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
/* /*
* They are willing to wait but there could be a timeout. * They are willing to wait but there could be a timeout.
*/ */
@@ -77,6 +80,7 @@ CORE_spinlock_Status _CORE_spinlock_Wait(
_ISR_Enable( level ); _ISR_Enable( level );
return CORE_SPINLOCK_TIMEOUT; return CORE_SPINLOCK_TIMEOUT;
} }
#endif
/* /*
* The thread is willing to spin so let's set things up so * The thread is willing to spin so let's set things up so