2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com>

* sp01/init.c, sp01/sp01.doc, sp01/system.h, sp01/task1.c, sp02/init.c,
	sp02/preempt.c, sp02/sp02.doc, sp02/system.h, sp02/task1.c,
	sp02/task2.c, sp02/task3.c, sp03/init.c, sp03/sp03.doc,
	sp03/system.h, sp03/task1.c, sp03/task2.c: Clean up. Update.
This commit is contained in:
Joel Sherrill
2011-06-11 19:26:41 +00:00
parent 2be7dcfc2e
commit 300fe1c6e0
17 changed files with 186 additions and 291 deletions

View File

@@ -1,3 +1,10 @@
2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp01/init.c, sp01/sp01.doc, sp01/system.h, sp01/task1.c, sp02/init.c,
sp02/preempt.c, sp02/sp02.doc, sp02/system.h, sp02/task1.c,
sp02/task2.c, sp02/task3.c, sp03/init.c, sp03/sp03.doc,
sp03/system.h, sp03/task1.c, sp03/task2.c: Clean up. Update.
2011-06-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp09/screen02.c, sp09/screen13.c, sp09/sp09.scn, sp29/init.c,

View File

@@ -1,17 +1,5 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is a user initialization task and has the responsibility for creating
* and starting the tasks that make up the test. If the time of day
* clock is required for the test, it should also be set to a known
* value by this function.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -34,6 +22,7 @@ rtems_task Init(
{
rtems_time_of_day time;
rtems_status_code status;
rtems_id id;
puts( "\n\n*** TEST 1 ***" );
@@ -41,47 +30,43 @@ rtems_task Init(
status = rtems_clock_set( &time );
directive_failed( status, "rtems_clock_set" );
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
status = rtems_task_create(
Task_name[ 1 ],
1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_INTERRUPT_LEVEL(31),
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ]
rtems_build_name( 'T', 'A', '1', ' ' ),
1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_INTERRUPT_LEVEL(31),
RTEMS_DEFAULT_ATTRIBUTES,
&id
);
directive_failed( status, "rtems_task_create of TA1" );
status = rtems_task_start( id, Task_1_through_3, 1 );
directive_failed( status, "rtems_task_start of TA1" );
status = rtems_task_create(
Task_name[ 2 ],
1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 2 ]
rtems_build_name( 'T', 'A', '2', ' ' ),
1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&id
);
directive_failed( status, "rtems_task_create of TA2" );
status = rtems_task_start( id, Task_1_through_3, 2 );
directive_failed( status, "rtems_task_start of TA2" );
status = rtems_task_create(
Task_name[ 3 ],
1,
RTEMS_MINIMUM_STACK_SIZE * 3,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 3 ]
rtems_build_name( 'T', 'A', '3', ' ' ),
1,
RTEMS_MINIMUM_STACK_SIZE * 3,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&id
);
directive_failed( status, "rtems_task_create of TA3" );
status = rtems_task_start( Task_id[ 1 ], Task_1_through_3, 0 );
directive_failed( status, "rtems_task_start of TA1" );
status = rtems_task_start( Task_id[ 2 ], Task_1_through_3, 0 );
directive_failed( status, "rtems_task_start of TA2" );
status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );
status = rtems_task_start( id, Task_1_through_3, 3 );
directive_failed( status, "rtems_task_start of TA3" );
status = rtems_task_delete( RTEMS_SELF );

View File

@@ -1,7 +1,7 @@
#
# $Id$
#
# COPYRIGHT (c) 1989-1999.
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
# The license and distribution terms for this file may be
@@ -9,37 +9,33 @@
# http://www.rtems.com/license/LICENSE.
#
This file describes the directives and concepts tested by this test set.
test set name: test1
test name: sp01
directives:
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
tm_set, tm_get, tm_wkafter
rtems_task_create
rtems_task_start
rtems_task_wake_after
rtems_clock_set
rtems_clock_get
rtems_clock_tick
rtems_task_self
rtems_object_get_classic_name
concepts:
a. Verifies system can create and start both the executive's system
initialization and idle task.
+ Verifies executive initialization performed correctly.
b. Verifies executive can swap between three application tasks at the
same priority and the executive's internal idle task.
+ Verifies system can create and start both the executive's system
initialization and idle task.
c. Verifies can print strings to the CRT on port 2 of the mvme136 board
using Print and Println in the board support package.
+ Verifies executive can swap between three application tasks at the
same priority and the executive's internal idle task.
d. Verifies interrupt handler can handle a task switch from an interrupt
as specified with the i_return directive.
+ Verifies can print strings using stdio and BSP console support.
e. Verifies executive initialization performed correctly.
+ Verifies interrupt support can handle a task switch from an interrupt.
f. Verifies the executive trap handler except for the halt function.
+ Verifies that a task can get the task identification number of itself.
g. Verifies that a task can get the task identification number of itself.
h. Verifies implementation of SuperCore TOD_MILLISECONDS_TO_TICKS. Normal
computation in applications is via a macro at the Classic API level.
output:
"TA1" is printed once every 5 seconds. "TA2" is printed once
every 10 seconds. "TA3" is printed once every 15 seconds.
+ Verifies implementation of SuperCore TOD_MILLISECONDS_TO_TICKS. Normal
computation in applications is via a macro at the Classic API level.

View File

@@ -1,9 +1,5 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -39,7 +35,4 @@ rtems_task Task_1_through_3(
/* global variables */
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
/* end of include file */

View File

@@ -1,14 +1,5 @@
/* Task_1_through_3
*
* This routine serves as a test task. It verifies the basic task
* switching capabilities of the executive.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -25,23 +16,23 @@
#include "system.h"
rtems_task Task_1_through_3(
rtems_task_argument argument
rtems_task_argument index
)
{
rtems_id tid;
rtems_time_of_day time;
rtems_status_code status;
rtems_interval ticks;
rtems_name name;
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
status = rtems_object_get_classic_name( rtems_task_self(), &name );
directive_failed( status, "rtems_object_get_classic_name" );
/*
* Use TOD_MILLISECONDS_TO_TICKS not RTEMS_MILLISECONDS_TO_TICKS to
* test C implementation in SuperCore -- not macro version used
* everywhere else.
*/
ticks = TOD_MILLISECONDS_TO_TICKS( task_number( tid ) * 5 * 1000 );
ticks = TOD_MILLISECONDS_TO_TICKS( index * 5 * 1000 );
while( FOREVER ) {
status = rtems_clock_get_tod( &time );
@@ -52,7 +43,7 @@ rtems_task Task_1_through_3(
rtems_test_exit( 0 );
}
put_name( Task_name[ task_number( tid ) ], FALSE );
put_name( name, FALSE );
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
status = rtems_task_wake_after( ticks );

View File

@@ -1,17 +1,5 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is a user initialization task and has the responsibility for creating
* and starting the tasks that make up the test. If the time of day
* clock is required for the test, it should also be set to a known
* value by this function.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -33,22 +21,21 @@ rtems_task Init(
)
{
rtems_status_code status;
rtems_id preempt_task_id;
puts( "\n\n*** TEST 2 ***" );
Preempt_task_name = rtems_build_name( 'P', 'R', 'M', 'T' );
status = rtems_task_create(
Preempt_task_name,
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Preempt_task_id
rtems_build_name( 'P', 'R', 'M', 'T' ),
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&preempt_task_id
);
directive_failed( status, "rtems_task_create of RTEMS_PREEMPT" );
status = rtems_task_start( Preempt_task_id, Preempt_task, 0 );
status = rtems_task_start( preempt_task_id, Preempt_task, 0 );
directive_failed( status, "rtems_task_start of RTEMS_PREEMPT" );
puts( "INIT - rtems_task_wake_after - yielding processor" );
@@ -112,41 +99,41 @@ rtems_task Init(
directive_failed( status, "rtems_task_delete of TA3" );
status = rtems_task_create(
Task_name[ 1 ],
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ]
Task_name[ 1 ],
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ]
);
directive_failed( status, "rtems_task_create of TA1" );
status = rtems_task_create(
Task_name[ 2 ],
3,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 2 ]
);
directive_failed( status, "rtems_task_create of TA2" );
status = rtems_task_create(
Task_name[ 3 ],
3,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 3 ]
);
directive_failed( status, "rtems_task_create of TA3" );
status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
directive_failed( status, "rtems_task_start of TA1" );
status = rtems_task_create(
Task_name[ 2 ],
3,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 2 ]
);
directive_failed( status, "rtems_task_create of TA2" );
status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
directive_failed( status, "rtems_task_start of TA2" );
status = rtems_task_create(
Task_name[ 3 ],
3,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 3 ]
);
directive_failed( status, "rtems_task_create of TA3" );
status = rtems_task_start( Task_id[ 3 ], Task_3, 0 );
directive_failed( status, "rtems_task_start of TA3" );

View File

@@ -1,13 +1,5 @@
/* Preempt_task
*
* This routine serves as a test task. It verifies the task manager.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be

View File

@@ -1,7 +1,7 @@
#
# $Id$
#
# COPYRIGHT (c) 1989-2009.
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
# The license and distribution terms for this file may be
@@ -9,31 +9,30 @@
# http://www.rtems.com/license/LICENSE.
#
This file describes the directives and concepts tested by this test set.
test set name: test2
test set name: sp02
directives:
ex_init, ex_start, t_create, t_start, tm_tick, i_return, t_ident,
t_delete, tm_wkafter, t_setpri, t_suspend
rtems_task_create
rtems_task_start
rtems_task_wake_after
rtems_clock_set
rtems_clock_get
rtems_clock_tick
rtems_task_set_priority
rtems_object_get_classic_name
rtems_task_suspend
concepts:
a. Verifies that a task can delete another task and also delete itself.
+ Verifies that a task can delete another task and also delete itself.
b. Verifies that memory is freed back to the heap correctly.
+ Verifies that memory is freed back to the heap correctly.
c. Verifies that TCBs are freed back to the inactive chain correctly.
+ Verifies that TCBs are freed back to the inactive chain correctly.
d. Verifies that a task can get the task identification number of
another task.
+ Verifies that a task can get the task ID of another task.
e. Verifies the _Set_state routine where the task is not READY.
+ Verifies the blocking routine where the task is not READY.
f. Verifies the break statement in the _Block_activate routine.
g. Verifies the while loop in the _Prev_tcb routine.
h. Verify behavior when the IDLE task's stack is configured for
less than the minimum stack size.
+ Verifies behavior when the IDLE task's stack is configured for
more than the minimum stack size.

View File

@@ -1,9 +1,5 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989-2009.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -58,7 +54,4 @@ rtems_task Task_3(
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
TEST_EXTERN rtems_id Preempt_task_id; /* preempt task id */
TEST_EXTERN rtems_name Preempt_task_name; /* preempt task name */
/* end of include file */

View File

@@ -1,13 +1,5 @@
/* Task_1
*
* This routine serves as a test task. It verifies the task manager.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-2009.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -40,7 +32,9 @@ rtems_task Task_1(
status = rtems_task_ident( Task_name[ 2 ], RTEMS_SEARCH_ALL_NODES, &tid2 );
directive_failed( status, "rtems_task_ident of TA2" );
printf( "TA1 - rtems_task_ident - tid of TA2 (0x%.8" PRIxrtems_id ")\n", tid2 );
printf(
"TA1 - rtems_task_ident - tid of TA2 (0x%.8" PRIxrtems_id ")\n", tid2
);
status = rtems_object_get_classic_name( tid2, &tid2_name );
directive_failed( status, "rtems_object_get_classic_name of TA2" );
@@ -50,14 +44,15 @@ rtems_task Task_1(
status = rtems_task_ident( Task_name[ 3 ], RTEMS_SEARCH_ALL_NODES, &tid3 );
directive_failed( status, "rtems_task_ident of TA3" );
printf( "TA1 - rtems_task_ident - tid of TA3 (0x%.8" PRIxrtems_id ")\n", tid3 );
printf(
"TA1 - rtems_task_ident - tid of TA3 (0x%.8" PRIxrtems_id ")\n", tid3
);
status = rtems_task_set_priority( tid3, 2, &previous_priority );
directive_failed( status, "rtems_task_set_priority" );
puts( "TA1 - rtems_task_set_priority - set TA3's priority to 2" );
puts( "TA1 - rtems_task_suspend - suspend TA2" );
status = rtems_task_suspend( tid2 );
directive_failed( status, "rtems_task_suspend of TA2" );
@@ -67,7 +62,7 @@ rtems_task Task_1(
directive_failed( status, "rtems_task_delete of TA2" );
puts( "TA1 - rtems_task_wake_after - sleep for 5 seconds" );
status = rtems_task_wake_after( 5*rtems_clock_get_ticks_per_second() );
status = rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
directive_failed( status, "rtems_task_wake_after" );
puts( "*** END OF TEST 2 ***" );

View File

@@ -1,15 +1,5 @@
/* Task_2
*
* This routine serves as a test task. It sleeps for 1 minute but
* does not expect to wake up. Task 1 should suspend then delete it
* so that it appears to never wake up.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-2009.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be

View File

@@ -1,14 +1,5 @@
/* Task_3
*
* This routine serves as a test task. It simply sleeps for 5 seconds
* and then deletes itself.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-2009.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be

View File

@@ -1,17 +1,5 @@
/* Init
*
* This routine is the initialization task for this test program.
* It is a user initialization task and has the responsibility for creating
* and starting the tasks that make up the test. If the time of day
* clock is required for the test, it should also be set to a known
* value by this function.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -33,36 +21,34 @@ rtems_task Init(
)
{
rtems_status_code status;
rtems_id id;
puts( "\n\n*** TEST 3 ***" );
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
status = rtems_task_create(
Task_name[ 1 ],
1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 1 ]
rtems_build_name( 'T', 'A', '1', ' ' ),
1,
RTEMS_MINIMUM_STACK_SIZE * 2,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&id
);
directive_failed( status, "rtems_task_create of TA1" );
status = rtems_task_start( id, Task_1, 0 );
directive_failed( status, "rtems_task_start of TA1" );
status = rtems_task_create(
Task_name[ 2 ],
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[ 2 ]
rtems_build_name( 'T', 'A', '2', ' ' ),
1,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
&id
);
directive_failed( status, "rtems_task_create of TA2" );
status = rtems_task_start( Task_id[ 1 ], Task_1, 0 );
directive_failed( status, "rtems_task_start of TA1" );
status = rtems_task_start( Task_id[ 2 ], Task_2, 0 );
status = rtems_task_start( id, Task_2, 0 );
directive_failed( status, "rtems_task_start of TA2" );
status = rtems_task_delete( RTEMS_SELF );

View File

@@ -1,7 +1,7 @@
#
# $Id$
#
# COPYRIGHT (c) 1989-1999.
# COPYRIGHT (c) 1989-2011.
# On-Line Applications Research Corporation (OAR).
#
# The license and distribution terms for this file may be
@@ -12,12 +12,20 @@
This file describes the directives and concepts tested by this test set.
test set name: test3
test set name: sp03
directives:
ex_init, ex_start, t_create, t_start, tm_tick, i_return, tm_wkafter,
tm_wkwhen, tm_set, tm_get
rtems_task_create
rtems_task_start
rtems_task_wake_after
rtems_task_wake_when
rtems_clock_set
rtems_clock_get
rtems_task_self
rtems_object_get_classic_name
concepts:
a. Verifies conversion routines - _Utd_to_etd and _Etd_to_utd
+ Verifies delay by interval.
+ Verifies delay by absolute time.

View File

@@ -1,9 +1,5 @@
/* system.h
*
* This include file contains information that is included in every
* function in the test set.
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -39,12 +35,8 @@ rtems_task Task_2(
#define CONFIGURE_EXTRA_TASK_STACKS (1 * RTEMS_MINIMUM_STACK_SIZE)
#define CONFIGURE_MAXIMUM_TASKS 3
#include <rtems/confdefs.h>
/* global variables */
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
/* end of include file */

View File

@@ -1,14 +1,5 @@
/* Task_1
*
* This routine serves as a test task. It verifies the capability to
* set and read the executives calender and clock.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-1999.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -30,20 +21,24 @@ rtems_task Task_1(
{
rtems_status_code status;
rtems_time_of_day time;
rtems_name name;
status = rtems_object_get_classic_name( rtems_task_self(), &name );
directive_failed( status, "rtems_object_get_classic_name" );
build_time( &time, 12, 31, 1988, 9, 15, 0, 0 );
status = rtems_clock_set( &time );
directive_failed( status, "rtems_clock_set" );
put_name( Task_name[ 1 ], FALSE );
put_name( name, FALSE );
print_time( " sets clock: ", &time, "\n" );
while( FOREVER ) {
status = rtems_clock_get_tod( &time );
directive_failed( status, "rtems_clock_get_tod" );
put_name( Task_name[ 1 ], FALSE );
put_name( name, FALSE );
print_time( " going to sleep: ", &time, "\n" );
time.second += 5;
@@ -56,7 +51,7 @@ rtems_task Task_1(
status = rtems_task_wake_when( &time );
directive_failed( status, "rtems_task_wake_when" );
put_name( Task_name[ 1 ], FALSE );
put_name( name, FALSE );
print_time( " awakened: ", &time, "\n" );
}
}

View File

@@ -1,14 +1,5 @@
/* Task_2
*
* This routine serves as a test task. It repeatedly gets the system time
* and date, converts it to printable form, and print it.
*
* Input parameters:
* argument - task argument
*
* Output parameters: NONE
*
* COPYRIGHT (c) 1989-2009.
/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -30,6 +21,10 @@ rtems_task Task_2(
{
rtems_status_code status;
rtems_time_of_day time;
rtems_name name;
status = rtems_object_get_classic_name( rtems_task_self(), &name );
directive_failed( status, "rtems_object_get_classic_name" );
while( FOREVER ) {
status = rtems_task_wake_after( rtems_clock_get_ticks_per_second() );
@@ -43,7 +38,7 @@ rtems_task Task_2(
rtems_test_exit( 0 );
}
put_name( Task_name[ 2 ], FALSE );
put_name( name, FALSE );
print_time( " ", &time, "\n" );
}
}