From ac7d5ef06a6d6e8d84abbd1f0b82162725f98326 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 11 May 1995 17:39:37 +0000 Subject: Initial revision --- testsuites/sptests/sp07/init.c | 131 +++++++++++++++++++++++++++++++++++++ testsuites/sptests/sp07/sp07.doc | 37 +++++++++++ testsuites/sptests/sp07/sp07.scn | 33 ++++++++++ testsuites/sptests/sp07/system.h | 35 ++++++++++ testsuites/sptests/sp07/task1.c | 85 ++++++++++++++++++++++++ testsuites/sptests/sp07/task2.c | 78 ++++++++++++++++++++++ testsuites/sptests/sp07/task3.c | 34 ++++++++++ testsuites/sptests/sp07/task4.c | 30 +++++++++ testsuites/sptests/sp07/taskexit.c | 33 ++++++++++ testsuites/sptests/sp07/tcreate.c | 34 ++++++++++ testsuites/sptests/sp07/tdelete.c | 37 +++++++++++ testsuites/sptests/sp07/trestart.c | 34 ++++++++++ testsuites/sptests/sp07/tstart.c | 34 ++++++++++ 13 files changed, 635 insertions(+) create mode 100644 testsuites/sptests/sp07/init.c create mode 100644 testsuites/sptests/sp07/sp07.doc create mode 100644 testsuites/sptests/sp07/sp07.scn create mode 100644 testsuites/sptests/sp07/system.h create mode 100644 testsuites/sptests/sp07/task1.c create mode 100644 testsuites/sptests/sp07/task2.c create mode 100644 testsuites/sptests/sp07/task3.c create mode 100644 testsuites/sptests/sp07/task4.c create mode 100644 testsuites/sptests/sp07/taskexit.c create mode 100644 testsuites/sptests/sp07/tcreate.c create mode 100644 testsuites/sptests/sp07/tdelete.c create mode 100644 testsuites/sptests/sp07/trestart.c create mode 100644 testsuites/sptests/sp07/tstart.c (limited to 'testsuites/sptests/sp07') diff --git a/testsuites/sptests/sp07/init.c b/testsuites/sptests/sp07/init.c new file mode 100644 index 0000000000..f5d00eae8e --- /dev/null +++ b/testsuites/sptests/sp07/init.c @@ -0,0 +1,131 @@ +/* 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, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" +#undef EXTERN +#define EXTERN +#include "conftbl.h" +#include "gvar.h" + +rtems_extensions_table Extensions = { + Task_create_extension, /* task create user extension */ + Task_start_extension, /* task start user extension */ + Task_restart_extension, /* task restart user extension */ + Task_delete_extension, /* task delete user extension */ + NULL, /* task switch user extension */ + NULL, /* begin user extension */ + Task_exit_extension, /* task exitted user extension */ + NULL /* fatal error extension */ +}; + +rtems_task Init( + rtems_task_argument argument +) +{ + rtems_status_code status; + + puts( "\n\n*** TEST 7 ***" ); + + Extension_name[ 1 ] = rtems_build_name( 'E', 'X', 'T', ' ' ); + + status = rtems_extension_create( + Extension_name[ 1 ], + &Extensions, + &Extension_id[ 1 ] + ); + directive_failed( status, "rtems_extension_create" ); + + 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', ' ' ); + Task_name[ 4 ] = rtems_build_name( 'T', 'A', '4', ' ' ); + + status = rtems_task_create( + Task_name[ 1 ], + 4, + 2048, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + &Task_id[ 1 ] + ); + directive_failed( status, "rtems_task_create of TA1" ); + + status = rtems_task_create( + Task_name[ 2 ], + 4, + 2048, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + &Task_id[ 2 ] + ); + directive_failed( status, "rtems_task_create of TA2" ); + + status = rtems_task_create( + Task_name[ 3 ], + 250, + 2048, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + &Task_id[ 3 ] + ); + directive_failed( status, "rtems_task_create of TA3" ); + + status = rtems_task_create( + Task_name[ 4 ], + 254, + 2048, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + &Task_id[ 4 ] + ); + directive_failed( status, "rtems_task_create of TA4" ); + + 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 ); + directive_failed( status, "rtems_task_start of TA2" ); + + status = rtems_task_start( Task_id[ 3 ], Task_3, 0 ); + directive_failed( status, "rtems_task_start of TA3" ); + + status = rtems_task_start( Task_id[ 4 ], Task_4, 0 ); + directive_failed( status, "rtems_task_start of TA4" ); + + status = rtems_task_restart( Task_id[ 3 ], 0 ); + directive_failed( status, "rtems_task_restart of TA3" ); + + status = rtems_task_set_note( Task_id[ 1 ], RTEMS_NOTEPAD_8, 4 ); + directive_failed( status, "task_set_node of TA1" ); + printf( "INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 " ); + puts ( "to TA1's priority: 04" ); + + status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, 4 ); + directive_failed( status, "task_set_node of TA2" ); + printf( "INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 " ); + puts ( "to TA2's priority: 04"); + + status = rtems_task_delete( RTEMS_SELF ); + directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); +} diff --git a/testsuites/sptests/sp07/sp07.doc b/testsuites/sptests/sp07/sp07.doc new file mode 100644 index 0000000000..47411194c6 --- /dev/null +++ b/testsuites/sptests/sp07/sp07.doc @@ -0,0 +1,37 @@ +# +# $Id$ +# +# COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. +# On-Line Applications Research Corporation (OAR). +# All rights assigned to U.S. Government, 1994. +# +# This material may be reproduced by or for the U.S. Government pursuant +# to the copyright license under the clause at DFARS 252.227-7013. This +# notice must appear in all copies of this file and its derivatives. +# + + +This file describes the directives and concepts tested by this test set. + +test set name: test7 + +directives: + ex_init, ex_start, t_create, t_start, tm_tick, i_return, + t_delete, t_setreg, t_getreg, t_setpri, t_suspend + +concepts: + + a. Verifies that tasks can communicate with each other via the + t_setreg and t_getreg directives. + + b. Verifies that the highest priority task is dispatched to execute. + + c. Verifies setting the priority of both a ready and a blocked task. + + d. Verifies the deletion of ready and blocked tasks. + + e. Verifies the tcreate user extension. + + f. Verifies the tstart user extension. + + g. Verifies the tdelete user extension. diff --git a/testsuites/sptests/sp07/sp07.scn b/testsuites/sptests/sp07/sp07.scn new file mode 100644 index 0000000000..1f6de2d93d --- /dev/null +++ b/testsuites/sptests/sp07/sp07.scn @@ -0,0 +1,33 @@ +*** TEST 7 *** +TASK_CREATE - TA1 - created. +TASK_CREATE - TA2 - created. +TASK_CREATE - TA3 - created. +TASK_CREATE - TA4 - created. +TASK_START - TA1 - started. +TASK_START - TA2 - started. +TASK_START - TA3 - started. +TASK_START - TA4 - started. +TASK_RESTART - TA3 - restarted. +INIT - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8 to TA1's priority: 04 +INIT - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8 to TA2's priority: 04 + +TA1 - rtems_task_set_priority - get initial priority of self: 04 +TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 04 +TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: 03 +TA1 - rtems_task_set_priority - set TA2's priority: 03 +TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 03 +TA2 - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8: 02 +TA2 - rtems_task_set_priority - set TA1's priority: 02 +TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 02 +TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: 01 +TA1 - rtems_task_set_priority - set TA2's priority: 01 +TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: 01 +TA2 - rtems_task_suspend - suspend TA1 +TA2 - rtems_task_set_priority - set priority of TA1 ( blocked ) +TASK_DELETE - TA2 deleting TA1 +TASK_DELETE - TA2 deleting TA3 +TASK_DELETE - TA2 deleting TA2 +TA4 - exitting task +RTEMS_TASK_EXITTED - extension invoked for TA4 +*** END OF TEST 7 *** +TASK_DELETE - TA4 deleting TA4 <---- may not appear diff --git a/testsuites/sptests/sp07/system.h b/testsuites/sptests/sp07/system.h new file mode 100644 index 0000000000..01a3e7f765 --- /dev/null +++ b/testsuites/sptests/sp07/system.h @@ -0,0 +1,35 @@ +/* system.h + * + * This include file contains information that is included in every + * function in the test set. + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include +#include "tmacros.h" + +/* constants */ + +#define SI_NAME 0x53595349 /* name - "SYSI" */ +#define I_NAME 0x49444c45 /* name - "IDLE" */ + +/* Miscellaneous */ + +#define EXTERN extern /* external definition */ + +/* macros */ + +/* structures */ + +#include "gvar.h" + +/* end of include file */ diff --git a/testsuites/sptests/sp07/task1.c b/testsuites/sptests/sp07/task1.c new file mode 100644 index 0000000000..62fa35cee9 --- /dev/null +++ b/testsuites/sptests/sp07/task1.c @@ -0,0 +1,85 @@ +/* Task_1 + * + * This routine serves as a test task. It verifies intertask communication + * using task notepads and verifies the the user extensions (tcreate, etc). + * + * Input parameters: + * argument - task argument + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_task Task_1( + rtems_task_argument argument +) +{ + rtems_status_code status; + rtems_task_priority the_priority; + rtems_task_priority previous_priority; + + pause(); + + status = rtems_task_set_priority( + RTEMS_SELF, + RTEMS_CURRENT_PRIORITY, + &the_priority + ); + directive_failed( status, "rtems_task_set_priority" ); + printf( + "TA1 - rtems_task_set_priority - get initial priority of self: %02d\n", + the_priority + ); + + while( FOREVER ) { + status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_8, &the_priority ); + directive_failed( status, "rtems_task_get_note" ); + printf( +"TA1 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: %02d\n", + the_priority + ); + + if ( --the_priority == 0 ) { + puts( "TA1 - rtems_task_suspend - suspend TA2" ); + status = rtems_task_suspend( Task_id[ 2 ] ); + directive_failed( status, "rtems_task_suspend" ); + + puts( "TA1 - rtems_task_set_priority - set priority of TA2 ( blocked )" ); + status = rtems_task_set_priority( Task_id[ 2 ], 5, &previous_priority ); + directive_failed( status, "rtems_task_set_priority" ); + + status = rtems_task_delete( Task_id[ 2 ] ); + directive_failed( status, "rtems_task_delete of TA2" ); + + status = rtems_task_delete( RTEMS_SELF ); + directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); + } + + printf( "TA1 - rtems_task_set_note - set TA2's RTEMS_NOTEPAD_8: %02d\n", + the_priority + ); + status = rtems_task_set_note( Task_id[ 2 ], RTEMS_NOTEPAD_8, the_priority ); + directive_failed( status, "rtems_task_set_note" ); + + printf( "TA1 - rtems_task_set_priority - set TA2's priority: %02d\n", + the_priority + ); + status = rtems_task_set_priority( + Task_id[ 2 ], + the_priority, + &previous_priority + ); + directive_failed( status, "rtems_task_set_priority" ); + } +} diff --git a/testsuites/sptests/sp07/task2.c b/testsuites/sptests/sp07/task2.c new file mode 100644 index 0000000000..622bdd8e3d --- /dev/null +++ b/testsuites/sptests/sp07/task2.c @@ -0,0 +1,78 @@ +/* Task_2 + * + * This routine serves as a test task. Plays with priorities to verify + * that the highest priority task is always executed. + * + * Input parameters: + * argument - task argument + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_task Task_2( + rtems_task_argument argument +) +{ + rtems_status_code status; + rtems_task_priority the_priority; + rtems_task_priority previous_priority; + + while( FOREVER ) { + + status = rtems_task_get_note( RTEMS_SELF, RTEMS_NOTEPAD_8, &the_priority ); + directive_failed( status, "rtems_task_get_note" ); + printf( +"TA2 - rtems_task_get_note - get RTEMS_NOTEPAD_8 - current priority: %02d\n", + the_priority + ); + + if ( --the_priority == 0 ) { + puts( "TA2 - rtems_task_suspend - suspend TA1" ); + status = rtems_task_suspend( Task_id[ 1 ] ); + directive_failed( status, "rtems_task_suspend" ); + + puts( "TA2 - rtems_task_set_priority - set priority of TA1 ( blocked )" ); + status = rtems_task_set_priority( Task_id[ 1 ], 5, &previous_priority ); + directive_failed( status, "rtems_task_set_priority" ); + + status = rtems_task_delete( Task_id[ 1 ] ); /* TA1 is blocked */ + directive_failed( status, "rtems_task_delete of TA1" ); + + status = rtems_task_delete( Task_id[ 3 ] ); /* TA3 is ready */ + directive_failed( status, "rtems_task_delete of TA3" ); + + status = rtems_task_delete( RTEMS_SELF ); + directive_failed( status, "rtems_task_delete of SELD" ); + + } else { + + printf( "TA2 - rtems_task_set_note - set TA1's RTEMS_NOTEPAD_8: %02d\n", + the_priority + ); + status = rtems_task_set_note(Task_id[ 1 ], RTEMS_NOTEPAD_8, the_priority); + directive_failed( status, "rtems_task_set_note" ); + + printf( "TA2 - rtems_task_set_priority - set TA1's priority: %02d\n", + the_priority + ); + status = rtems_task_set_priority( + Task_id[ 1 ], + the_priority, + &previous_priority + ); + directive_failed( status, "rtems_task_set_priority" ); + } + } +} diff --git a/testsuites/sptests/sp07/task3.c b/testsuites/sptests/sp07/task3.c new file mode 100644 index 0000000000..dce44b283b --- /dev/null +++ b/testsuites/sptests/sp07/task3.c @@ -0,0 +1,34 @@ +/* Task_3 + * + * This routine serves as a low priority test task that should never + * execute. + * + * Input parameters: + * argument - task argument + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_task Task_3( + rtems_task_argument argument +) +{ + rtems_status_code status; + + while( FOREVER ) { + status = rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ); + directive_failed( status, "rtems_task_wake_after" ); + } +} diff --git a/testsuites/sptests/sp07/task4.c b/testsuites/sptests/sp07/task4.c new file mode 100644 index 0000000000..cc9de6d4c3 --- /dev/null +++ b/testsuites/sptests/sp07/task4.c @@ -0,0 +1,30 @@ +/* Task_4 + * + * This routine serves as a low priority test task that should exit + * a soon as it runs to test the taskexitted user extension. + * execute. + * + * Input parameters: + * argument - task argument + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_task Task_4( + rtems_task_argument argument +) +{ + puts( "TA4 - exitting task" ); +} diff --git a/testsuites/sptests/sp07/taskexit.c b/testsuites/sptests/sp07/taskexit.c new file mode 100644 index 0000000000..ad52d1f3a7 --- /dev/null +++ b/testsuites/sptests/sp07/taskexit.c @@ -0,0 +1,33 @@ +/* Task_exit_extension + * + * This routine is the task exitted user extension. + * + * Input parameters: NONE + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_extension Task_exit_extension( + rtems_tcb *running_task +) +{ + if ( task_number( running_task->Object.id ) > 0 ) { + puts_nocr( "RTEMS_TASK_EXITTED - extension invoked for " ); + put_name( Task_name[ task_number( running_task->Object.id ) ], TRUE ); + } + + puts("*** END OF TEST 7 ***" ); + exit( 0 ); +} diff --git a/testsuites/sptests/sp07/tcreate.c b/testsuites/sptests/sp07/tcreate.c new file mode 100644 index 0000000000..7b066630f0 --- /dev/null +++ b/testsuites/sptests/sp07/tcreate.c @@ -0,0 +1,34 @@ +/* Task_create_extension + * + * This routine is the tcreate user extension. + * + * Input parameters: + * unused - pointer to currently running TCB + * created_task - pointer to new TCB being created + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_extension Task_create_extension( + rtems_tcb *unused, + rtems_tcb *created_task +) +{ + if ( task_number( created_task->Object.id ) > 0 ) { + puts_nocr( "TASK_CREATE - " ); + put_name( Task_name[ task_number( created_task->Object.id ) ], FALSE ); + puts( " - created." ); + } +} diff --git a/testsuites/sptests/sp07/tdelete.c b/testsuites/sptests/sp07/tdelete.c new file mode 100644 index 0000000000..9d7c5749c1 --- /dev/null +++ b/testsuites/sptests/sp07/tdelete.c @@ -0,0 +1,37 @@ +/* Task_delete_extension + * + * This routine is the delete user extension. + * + * Input parameters: + * running_task - pointer to running TCB + * deleted_task - pointer to TCB deleted + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_extension Task_delete_extension( + rtems_tcb *running_task, + rtems_tcb *deleted_task +) +{ + if ( task_number( running_task->Object.id ) > 0 ) { + puts_nocr( "TASK_DELETE - " ); + put_name( Task_name[ task_number( running_task->Object.id ) ], FALSE ); + } + if ( task_number( deleted_task->Object.id ) > 0 ) { + puts_nocr( " deleting " ); + put_name( Task_name[ task_number( deleted_task->Object.id ) ], TRUE ); + } +} diff --git a/testsuites/sptests/sp07/trestart.c b/testsuites/sptests/sp07/trestart.c new file mode 100644 index 0000000000..6cefb485a6 --- /dev/null +++ b/testsuites/sptests/sp07/trestart.c @@ -0,0 +1,34 @@ +/* Task_restart_extension + * + * This routine is the trestart user extension. + * + * Input parameters: + * unused - pointer to currently running TCB + * restarted_task - pointer to new TCB being started + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +void Task_restart_extension( + rtems_tcb *unused, + rtems_tcb *restarted_task +) +{ + if ( task_number( restarted_task->Object.id ) > 0 ) { + puts_nocr( "TASK_RESTART - " ); + put_name( Task_name[ task_number( restarted_task->Object.id ) ], FALSE ); + puts( " - restarted." ); + } +} diff --git a/testsuites/sptests/sp07/tstart.c b/testsuites/sptests/sp07/tstart.c new file mode 100644 index 0000000000..1b1fc795b7 --- /dev/null +++ b/testsuites/sptests/sp07/tstart.c @@ -0,0 +1,34 @@ +/* Task_start_extension + * + * This routine is the tstart user extension. + * + * Input parameters: + * unused - pointer to currently running TCB + * started_task - pointer to new TCB being started + * + * Output parameters: NONE + * + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. + * On-Line Applications Research Corporation (OAR). + * All rights assigned to U.S. Government, 1994. + * + * This material may be reproduced by or for the U.S. Government pursuant + * to the copyright license under the clause at DFARS 252.227-7013. This + * notice must appear in all copies of this file and its derivatives. + * + * $Id$ + */ + +#include "system.h" + +rtems_extension Task_start_extension( + rtems_tcb *unused, + rtems_tcb *started_task +) +{ + if ( task_number( started_task->Object.id ) > 0 ) { + puts_nocr( "TASK_START - " ); + put_name( Task_name[ task_number( started_task->Object.id ) ], FALSE ); + puts( " - started." ); + } +} -- cgit v1.2.3