forked from Imagelibrary/rtems
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user