2011-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>

* sp74/init.c, sp74/sp74.scn: Fix to get the case hit per coverage
	reports.
This commit is contained in:
Joel Sherrill
2011-07-26 19:44:20 +00:00
parent 93f7c600f7
commit 6d94119ed8
3 changed files with 10 additions and 27 deletions

View File

@@ -1,3 +1,8 @@
2011-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sp74/init.c, sp74/sp74.scn: Fix to get the case hit per coverage
reports.
2011-07-26 Joel Sherrill <joel.sherrill@oarcorp.com> 2011-07-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp74/init.c: Does not need clock driver. * sp74/init.c: Does not need clock driver.

View File

@@ -15,11 +15,6 @@
#include <tmacros.h> #include <tmacros.h>
/*
* Keep the names and IDs in global variables so another task can use them.
*/
rtems_id Task_id[ 3 ]; /* array of task ids */
rtems_name Task_name[ 3 ]; /* array of task names */
rtems_task Test_task( rtems_task Test_task(
rtems_task_argument index rtems_task_argument index
@@ -35,41 +30,25 @@ rtems_task Init(
rtems_task_argument argument rtems_task_argument argument
) )
{ {
rtems_status_code status; rtems_status_code status;
rtems_id id;
puts( "\n\n*** SP74 (YIELD) TEST ***" ); puts( "\n\n*** SP74 (YIELD) TEST ***" );
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
puts( "Create TA1 at higher priority task" ); puts( "Create TA1 at higher priority task" );
status = rtems_task_create( status = rtems_task_create(
Task_name[ 1 ], rtems_build_name( 'T', 'A', '1', ' ' ),
1, 1,
RTEMS_MINIMUM_STACK_SIZE, RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES, RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ] &id
); );
directive_failed( status, "create 1" ); directive_failed( status, "create 1" );
puts( "Create TA2 at equal priority task" ); status = rtems_task_start( id, Test_task, 1 );
status = rtems_task_create(
Task_name[ 2 ],
2,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 2 ]
);
directive_failed( status, "create 2" );
status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
directive_failed( status, "start 1" ); directive_failed( status, "start 1" );
status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
directive_failed( status, "start 2" );
puts( "Yield to TA1" ); puts( "Yield to TA1" );
status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR );
directive_failed( status, "yield" ); directive_failed( status, "yield" );

View File

@@ -1,6 +1,5 @@
*** SP74 (YIELD) TEST *** *** SP74 (YIELD) TEST ***
Create TA1 at higher priority task Create TA1 at higher priority task
Create TA2 at equal priority task
Yield to TA1 Yield to TA1
Successfully yielded it to higher priority task Successfully yielded it to higher priority task
*** END OF SP74 TEST *** *** END OF SP74 TEST ***