source: rtems/testsuites/itrontests/itrontask01/init.c @ 352c9b2

4.104.114.84.95
Last change on this file since 352c9b2 was 352c9b2, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 9, 1999 at 10:07:23 PM

This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*  Init
2 *
3 *  This routine is the initialization task for this test program.
4 *  It is a user initialization task and has the responsibility for creating
5 *  and starting the tasks that make up the test.  If the time of day
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.
8 *
9 *  Input parameters:  NONE
10 *
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 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.OARcorp.com/rtems/license.html.
20 *
21 *  $Id$
22 */
23
24
25#define TEST_INIT
26#include "system.h"
27
28#warning "Task_id is really an rtems_id"
29void Task_1_through_3( void ){}
30
31void ITRON_Init( void )
32{
33  rtems_time_of_day time;
34  ER                status;
35  T_CTSK            values;
36
37  puts( "\n\n*** ITRONTASK01 - TICKER TEST ***" );
38
39  build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
40  status = rtems_clock_set( &time );
41  directive_failed( status, "rtems_clock_set" );
42
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;
48
49  status = cre_tsk( Task_id[1], &values );
50  directive_failed( status, "cre_tsk of TA1" );
51
52  values.stksz   = RTEMS_MINIMUM_STACK_SIZE;
53  status = cre_tsk( Task_id[2], &values );
54  directive_failed( status, "cre_tsk of TA1" );
55
56  values.stksz   = RTEMS_MINIMUM_STACK_SIZE;
57  status = cre_tsk( Task_id[3], &values );
58  directive_failed( status, "cre_tsk of TA1" );
59
60#if 0
61  status = sta_tsk( Task_id[1] );
62  directive_failed( status, "rtems_task_start of TA1" );
63
64  directive_failed( status, "rtems_task_start of TA2" );
65
66  status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );
67  directive_failed( status, "rtems_task_start of TA3" );
68
69  status = rtems_task_delete( RTEMS_SELF );
70  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
71#endif
72}
Note: See TracBrowser for help on using the repository browser.