2009-07-20 Joel Sherrill <joel.sherrill@OARcorp.com>

* spintrcritical_support/intrcritical.c,
	spintrcritical_support/intrcritical.h: Change prototype of delay
	method to indicate when counter is reset. This can be used to count
	how many iterations we are doing.
This commit is contained in:
Joel Sherrill
2009-07-20 14:48:14 +00:00
parent 72ea4cc86f
commit 260e09260a
3 changed files with 25 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
2009-07-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* spintrcritical_support/intrcritical.c,
spintrcritical_support/intrcritical.h: Change prototype of delay
method to indicate when counter is reset. This can be used to count
how many iterations we are doing.
2009-07-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add sp60 to exercise case where a task is

View File

@@ -57,10 +57,11 @@ void interrupt_critical_section_test_support_initialize(
#endif
}
void interrupt_critical_section_test_support_delay(void)
bool interrupt_critical_section_test_support_delay(void)
{
uint32_t counter;
Watchdog_Interval initial;
bool retval;
if (TSR) {
rtems_status_code rc;
@@ -72,8 +73,12 @@ void interrupt_critical_section_test_support_delay(void)
/*
* Count down
*/
if ( !Maximum_current )
if ( !Maximum_current ) {
Maximum_current = Maximum;
retval = true;
} else
retval = false;
initial = _Watchdog_Ticks_since_boot;
for (counter=Maximum_current ; counter ; counter--)
if ( initial != _Watchdog_Ticks_since_boot )
@@ -84,4 +89,5 @@ void interrupt_critical_section_test_support_delay(void)
/*
* Return so the test can try to generate the condition
*/
return retval;
}

View File

@@ -21,6 +21,15 @@ void interrupt_critical_section_test_support_initialize(
rtems_timer_service_routine (*tsr)( rtems_id, void * )
);
void interrupt_critical_section_test_support_delay(void);
/**
* @brief Delay Test Support
*
* This method delays a varying amount of time each call.
*
* @return This method returns true each time the delay counter has
* to be reset.
*/
bool interrupt_critical_section_test_support_delay(void);
#endif