Changeset e099180 in rtems


Ignore:
Timestamp:
Nov 9, 1999, 11:27:05 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
bab5ba44
Parents:
3d67661
Message:

Merged tests from Task group.

Files:
62 added
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/itrontests/itrontask01/init.c

    r3d67661 re099180  
    22 *
    33 *  This routine is the initialization task for this test program.
    4  *  It is a user initialization task and has the responsibility for creating
     4 *  It is called from init_exec and has the responsibility for creating
    55 *  and starting the tasks that make up the test.  If the time of day
    66 *  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.
    88 *
    99 *  Input parameters:  NONE
    1010 *
    1111 *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1998.
    14  *  On-Line Applications Research Corporation (OAR).
    15  *  Copyright assigned to U.S. Government, 1994.
    1612 *
    1713 *  The license and distribution terms for this file may be
     
    2218 */
    2319
    24 
    2520#define TEST_INIT
    2621#include "system.h"
    27 
    28 #warning "Task_id is really an rtems_id"
    29 void Task_1_through_3( void ){}
     22#include <stdio.h>
    3023
    3124void ITRON_Init( void )
     
    3326  rtems_time_of_day time;
    3427  ER                status;
    35   T_CTSK            values;
     28  T_CTSK            pk_ctsk;
    3629
    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   */
    3835
    3936  build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
     
    4138  directive_failed( status, "rtems_clock_set" );
    4239
    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;
    4844
    49   status = cre_tsk( Task_id[1], &values );
     45  pk_ctsk.stksz    = RTEMS_MINIMUM_STACK_SIZE;
     46  status = cre_tsk( 2, &pk_ctsk );
    5047  directive_failed( status, "cre_tsk of TA1" );
    5148
    52   values.stksz   = RTEMS_MINIMUM_STACK_SIZE;
    53   status = cre_tsk( Task_id[2], &values );
    54   directive_failed( status, "cre_tsk of TA1" );
     49  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
     50  status = cre_tsk( 3, &pk_ctsk );
     51  directive_failed( status, "cre_tsk of TA2" );
    5552
    56   values.stksz   = RTEMS_MINIMUM_STACK_SIZE;
    57   status = cre_tsk( Task_id[3], &values );
    58   directive_failed( status, "cre_tsk of TA1" );
     53  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3;
     54  status = cre_tsk( 4, &pk_ctsk );
     55  directive_failed( status, "cre_tsk of TA3" );
    5956
    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" );
    6359
    64   directive_failed( status, "rtems_task_start of TA2" );
     60  status  = sta_tsk( 3, 0 );
     61  directive_failed( status, "sta_tsk of TA1" );
    6562
    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" );
    6865
    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" );
    7268}
  • c/src/tests/itrontests/itrontask01/system.h

    r3d67661 re099180  
    1616
    1717#include <tmacros.h>
    18 #include <itron.h>
    1918
    2019/* functions */
    2120
    2221void ITRON_Init( void );
     22void Task_2_through_4();
    2323
    2424/* configuration information */
     
    2929#define CONFIGURE_ITRON_INIT_TASK_TABLE
    3030
    31 #define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
    32 
    3331#include <confdefs.h>
    3432
    3533/* global variables */
    3634
    37 TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
     35/* end of include file */
    3836
    39 /* end of include file */
     37
     38
  • testsuites/itrontests/itrontask01/init.c

    r3d67661 re099180  
    22 *
    33 *  This routine is the initialization task for this test program.
    4  *  It is a user initialization task and has the responsibility for creating
     4 *  It is called from init_exec and has the responsibility for creating
    55 *  and starting the tasks that make up the test.  If the time of day
    66 *  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.
    88 *
    99 *  Input parameters:  NONE
    1010 *
    1111 *  Output parameters:  NONE
    12  *
    13  *  COPYRIGHT (c) 1989-1998.
    14  *  On-Line Applications Research Corporation (OAR).
    15  *  Copyright assigned to U.S. Government, 1994.
    1612 *
    1713 *  The license and distribution terms for this file may be
     
    2218 */
    2319
    24 
    2520#define TEST_INIT
    2621#include "system.h"
    27 
    28 #warning "Task_id is really an rtems_id"
    29 void Task_1_through_3( void ){}
     22#include <stdio.h>
    3023
    3124void ITRON_Init( void )
     
    3326  rtems_time_of_day time;
    3427  ER                status;
    35   T_CTSK            values;
     28  T_CTSK            pk_ctsk;
    3629
    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   */
    3835
    3936  build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
     
    4138  directive_failed( status, "rtems_clock_set" );
    4239
    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;
    4844
    49   status = cre_tsk( Task_id[1], &values );
     45  pk_ctsk.stksz    = RTEMS_MINIMUM_STACK_SIZE;
     46  status = cre_tsk( 2, &pk_ctsk );
    5047  directive_failed( status, "cre_tsk of TA1" );
    5148
    52   values.stksz   = RTEMS_MINIMUM_STACK_SIZE;
    53   status = cre_tsk( Task_id[2], &values );
    54   directive_failed( status, "cre_tsk of TA1" );
     49  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
     50  status = cre_tsk( 3, &pk_ctsk );
     51  directive_failed( status, "cre_tsk of TA2" );
    5552
    56   values.stksz   = RTEMS_MINIMUM_STACK_SIZE;
    57   status = cre_tsk( Task_id[3], &values );
    58   directive_failed( status, "cre_tsk of TA1" );
     53  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3;
     54  status = cre_tsk( 4, &pk_ctsk );
     55  directive_failed( status, "cre_tsk of TA3" );
    5956
    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" );
    6359
    64   directive_failed( status, "rtems_task_start of TA2" );
     60  status  = sta_tsk( 3, 0 );
     61  directive_failed( status, "sta_tsk of TA1" );
    6562
    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" );
    6865
    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" );
    7268}
  • testsuites/itrontests/itrontask01/system.h

    r3d67661 re099180  
    1616
    1717#include <tmacros.h>
    18 #include <itron.h>
    1918
    2019/* functions */
    2120
    2221void ITRON_Init( void );
     22void Task_2_through_4();
    2323
    2424/* configuration information */
     
    2929#define CONFIGURE_ITRON_INIT_TASK_TABLE
    3030
    31 #define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
    32 
    3331#include <confdefs.h>
    3432
    3533/* global variables */
    3634
    37 TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
     35/* end of include file */
    3836
    39 /* end of include file */
     37
     38
Note: See TracChangeset for help on using the changeset viewer.