source: rtems/c/src/tests/itrontests/itrontask01/init.c @ 2f564fee

4.104.114.84.95
Last change on this file since 2f564fee was 2f564fee, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:53:25

2003-09-04 Joel Sherrill <joel@…>

  • itronhello/init.c, itronhello/itronhello.doc, itronhello/system.h, itronmbf01/init.c, itronmbf01/itronmbf01.doc, itronmbf01/system.h, itronmbox01/init.c, itronmbox01/system.h, itronsem01/init.c, itronsem01/itronsem01.doc, itronsem01/system.h, itrontask01/init.c, itrontask01/itrontask01.doc, itrontask01/system.h, itrontask01/task1.c, itrontask02/dormant.c, itrontask02/init.c, itrontask02/itrontask02.doc, itrontask02/system.h, itrontask03/init.c, itrontask03/itrontask03.doc, itrontask03/preempt.c, itrontask03/system.h, itrontask03/task1.c, itrontask03/task2.c, itrontask03/task3.c, itrontask04/init.c, itrontask04/itrontask04.doc, itrontask04/system.h, itrontask04/task1.c, itrontask04/task2.c, itrontask04/task3.c, itrontime01/init.c, itrontime01/system.h: URL for license changed.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*  Init
2 *
3 *  This routine is the initialization task for this test program.
4 *  It is called from init_exec 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.
8 *
9 *  Input parameters:  NONE
10 *
11 *  Output parameters:  NONE
12 *
13 *  COPYRIGHT (c) 1989-1999.
14 *  On-Line Applications Research Corporation (OAR).
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.com/license/LICENSE.
19 *
20 *  $Id$
21 */
22
23#define TEST_INIT
24#include "system.h"
25#include <stdio.h>
26
27void ITRON_Init( void )
28{
29  rtems_time_of_day time;
30  ER                status;
31  T_CTSK            pk_ctsk;
32
33  puts( "\n\n*** ITRON TASK TEST 1 ***" );
34
35  /*
36   * XXX - Change this to an itron clock !!
37   */
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  pk_ctsk.exinf    = NULL;
44  pk_ctsk.tskatr   = TA_HLNG;
45  pk_ctsk.itskpri  = 1;
46  pk_ctsk.task     = Task_2_through_4;
47
48  pk_ctsk.stksz    = RTEMS_MINIMUM_STACK_SIZE * 2;
49  status = cre_tsk( 2, &pk_ctsk );
50  directive_failed( status, "cre_tsk of TA1" );
51
52  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
53  status = cre_tsk( 3, &pk_ctsk );
54  directive_failed( status, "cre_tsk of TA2" );
55
56  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3;
57  status = cre_tsk( 4, &pk_ctsk );
58  directive_failed( status, "cre_tsk of TA3" );
59
60  status  = sta_tsk( 2, 0 );
61  directive_failed( status, "sta_tsk of TA1" );
62
63  status  = sta_tsk( 3, 0 );
64  directive_failed( status, "sta_tsk of TA1" );
65
66  status  = sta_tsk( 4, 0 );
67  directive_failed( status, "sta_tsk of TA1" );
68
69  exd_tsk();
70  directive_failed( 0, "exd_tsk" );
71}
Note: See TracBrowser for help on using the repository browser.