Changeset e099180 in rtems for testsuites/itrontests/itrontask01
- Timestamp:
- 11/09/99 23:27:05 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- bab5ba44
- Parents:
- 3d67661
- Location:
- testsuites/itrontests/itrontask01
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/itrontests/itrontask01/init.c
r3d67661 re099180 2 2 * 3 3 * This routine is the initialization task for this test program. 4 * It is a user initialization taskand has the responsibility for creating4 * It is called from init_exec and has the responsibility for creating 5 5 * and starting the tasks that make up the test. If the time of day 6 6 * clock is required for the test, it should also be set to a known 7 * value by this function. This test is based off of sp01.7 * value by this function. 8 8 * 9 9 * Input parameters: NONE 10 10 * 11 11 * Output parameters: NONE 12 *13 * COPYRIGHT (c) 1989-1998.14 * On-Line Applications Research Corporation (OAR).15 * Copyright assigned to U.S. Government, 1994.16 12 * 17 13 * The license and distribution terms for this file may be … … 22 18 */ 23 19 24 25 20 #define TEST_INIT 26 21 #include "system.h" 27 28 #warning "Task_id is really an rtems_id" 29 void Task_1_through_3( void ){} 22 #include <stdio.h> 30 23 31 24 void ITRON_Init( void ) … … 33 26 rtems_time_of_day time; 34 27 ER status; 35 T_CTSK values;28 T_CTSK pk_ctsk; 36 29 37 puts( "\n\n*** ITRONTASK01 - TICKER TEST ***" ); 30 puts( "\n\n*** ITRON TEST 3 ***" ); 31 32 /* 33 * XXX - Change this to an itron clock !! 34 */ 38 35 39 36 build_time( &time, 12, 31, 1988, 9, 0, 0, 0 ); … … 41 38 directive_failed( status, "rtems_clock_set" ); 42 39 43 values.exinf = NULL; 44 values.tskatr = TA_HLNG; 45 values.task = Task_1_through_3; 46 values.itskpri = 1; 47 values.stksz = RTEMS_MINIMUM_STACK_SIZE; 40 pk_ctsk.exinf = NULL; 41 pk_ctsk.tskatr = TA_HLNG; 42 pk_ctsk.itskpri = 1; 43 pk_ctsk.task = Task_2_through_4; 48 44 49 status = cre_tsk( Task_id[1], &values ); 45 pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE; 46 status = cre_tsk( 2, &pk_ctsk ); 50 47 directive_failed( status, "cre_tsk of TA1" ); 51 48 52 values.stksz = RTEMS_MINIMUM_STACK_SIZE;53 status = cre_tsk( Task_id[2], &values);54 directive_failed( status, "cre_tsk of TA 1" );49 pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2; 50 status = cre_tsk( 3, &pk_ctsk ); 51 directive_failed( status, "cre_tsk of TA2" ); 55 52 56 values.stksz = RTEMS_MINIMUM_STACK_SIZE;57 status = cre_tsk( Task_id[3], &values);58 directive_failed( status, "cre_tsk of TA 1" );53 pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3; 54 status = cre_tsk( 4, &pk_ctsk ); 55 directive_failed( status, "cre_tsk of TA3" ); 59 56 60 #if 0 61 status = sta_tsk( Task_id[1] ); 62 directive_failed( status, "rtems_task_start of TA1" ); 57 status = sta_tsk( 2, 0 ); 58 directive_failed( status, "sta_tsk of TA1" ); 63 59 64 directive_failed( status, "rtems_task_start of TA2" ); 60 status = sta_tsk( 3, 0 ); 61 directive_failed( status, "sta_tsk of TA1" ); 65 62 66 status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );67 directive_failed( status, " rtems_task_start of TA3" );63 status = sta_tsk( 4, 0 ); 64 directive_failed( status, "sta_tsk of TA1" ); 68 65 69 status = rtems_task_delete( RTEMS_SELF ); 70 directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); 71 #endif 66 exd_tsk(); 67 directive_failed( 0, "exd_tsk" ); 72 68 } -
testsuites/itrontests/itrontask01/system.h
r3d67661 re099180 16 16 17 17 #include <tmacros.h> 18 #include <itron.h>19 18 20 19 /* functions */ 21 20 22 21 void ITRON_Init( void ); 22 void Task_2_through_4(); 23 23 24 24 /* configuration information */ … … 29 29 #define CONFIGURE_ITRON_INIT_TASK_TABLE 30 30 31 #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)32 33 31 #include <confdefs.h> 34 32 35 33 /* global variables */ 36 34 37 TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids*/35 /* end of include file */ 38 36 39 /* end of include file */ 37 38
Note: See TracChangeset
for help on using the changeset viewer.