source: rtems/testsuites/itrontests/itrontask01/init.c @ 3136f5c9

4.104.114.84.95
Last change on this file since 3136f5c9 was 3136f5c9, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 12, 1999 at 2:49:47 PM

Test name changed to reflect placement after merger.

Increased stack space.

  • Property mode set to 100644
File size: 1.7 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 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.OARcorp.com/rtems/license.html.
16 *
17 *  $Id$
18 */
19
20#define TEST_INIT
21#include "system.h"
22#include <stdio.h>
23
24void ITRON_Init( void )
25{
26  rtems_time_of_day time;
27  ER                status;
28  T_CTSK            pk_ctsk;
29
30  puts( "\n\n*** ITRON TASK TEST 1 ***" );
31
32  /*
33   * XXX - Change this to an itron clock !!
34   */
35
36  build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
37  status = rtems_clock_set( &time );
38  directive_failed( status, "rtems_clock_set" );
39
40  pk_ctsk.exinf    = NULL;
41  pk_ctsk.tskatr   = TA_HLNG;
42  pk_ctsk.itskpri  = 1; 
43  pk_ctsk.task     = Task_2_through_4;
44
45  pk_ctsk.stksz    = RTEMS_MINIMUM_STACK_SIZE * 2; 
46  status = cre_tsk( 2, &pk_ctsk );
47  directive_failed( status, "cre_tsk of TA1" );
48
49  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 2;
50  status = cre_tsk( 3, &pk_ctsk );
51  directive_failed( status, "cre_tsk of TA2" );
52
53  pk_ctsk.stksz = RTEMS_MINIMUM_STACK_SIZE * 3; 
54  status = cre_tsk( 4, &pk_ctsk );
55  directive_failed( status, "cre_tsk of TA3" );
56
57  status  = sta_tsk( 2, 0 );
58  directive_failed( status, "sta_tsk of TA1" );
59
60  status  = sta_tsk( 3, 0 );
61  directive_failed( status, "sta_tsk of TA1" );
62
63  status  = sta_tsk( 4, 0 );
64  directive_failed( status, "sta_tsk of TA1" );
65
66  exd_tsk();
67  directive_failed( 0, "exd_tsk" );
68}
Note: See TracBrowser for help on using the repository browser.