OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [tests/] [itrontests/] [itrontask01/] [init.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  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.OARcorp.com/rtems/license.html.
19
 *
20
 *  init.c,v 1.4 1999/11/17 16:47:52 jennifer Exp
21
 */
22
 
23
#define TEST_INIT
24
#include "system.h"
25
#include <stdio.h>
26
 
27
void 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.