source: rtems/testsuites/samples/ticker/init.c @ 03f2154e

4.104.114.84.95
Last change on this file since 03f2154e was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on 04/22/97 at 17:20:27

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

  • 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-1997.
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 in
18 *  the file LICENSE in this distribution or at
19 *  http://www.OARcorp.com/rtems/license.html.
20 *
21 *  $Id$
22 */
23
24#define TEST_INIT
25#include "system.h"
26
27rtems_task Init(
28  rtems_task_argument argument
29)
30{
31  rtems_status_code status;
32  rtems_time_of_day time;
33
34  puts( "\n\n*** CLOCK TICK TEST ***" );
35
36  build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
37  status = rtems_clock_set( &time );
38
39  Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
40  Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
41  Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
42
43  status = rtems_task_create(
44    Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
45    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
46  );
47  status = rtems_task_create(
48    Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
49    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
50  );
51  status = rtems_task_create(
52    Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
53    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
54  );
55
56  status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
57  status = rtems_task_start( Task_id[ 2 ], Test_task, 2 );
58  status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
59
60  status = rtems_task_delete( RTEMS_SELF );
61}
Note: See TracBrowser for help on using the repository browser.