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. |
---|
8 | * |
---|
9 | * Input parameters: |
---|
10 | * argument - task argument |
---|
11 | * |
---|
12 | * Output parameters: NONE |
---|
13 | * |
---|
14 | * COPYRIGHT (c) 1989-1999. |
---|
15 | * On-Line Applications Research Corporation (OAR). |
---|
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.rtems.com/license/LICENSE. |
---|
20 | * |
---|
21 | * $Id$ |
---|
22 | */ |
---|
23 | |
---|
24 | #ifdef HAVE_CONFIG_H |
---|
25 | #include "config.h" |
---|
26 | #endif |
---|
27 | |
---|
28 | #define CONFIGURE_INIT |
---|
29 | #include "system.h" |
---|
30 | |
---|
31 | rtems_task Init( |
---|
32 | rtems_task_argument argument |
---|
33 | ) |
---|
34 | { |
---|
35 | rtems_status_code status; |
---|
36 | |
---|
37 | printf( |
---|
38 | "\n\n*** TEST 2 -- NODE %" PRIu32 " ***\n", |
---|
39 | Multiprocessing_configuration.node |
---|
40 | ); |
---|
41 | |
---|
42 | Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' ); |
---|
43 | Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' ); |
---|
44 | |
---|
45 | puts( "Creating Test_task (Global)" ); |
---|
46 | status = rtems_task_create( |
---|
47 | Task_name[Multiprocessing_configuration.node], |
---|
48 | 1, |
---|
49 | RTEMS_MINIMUM_STACK_SIZE, |
---|
50 | RTEMS_NO_PREEMPT, |
---|
51 | RTEMS_GLOBAL, |
---|
52 | &Task_id[ 1 ] |
---|
53 | ); |
---|
54 | directive_failed( status, "rtems_task_create" ); |
---|
55 | |
---|
56 | puts( "Starting Test_task (Global)" ); |
---|
57 | status = rtems_task_start( Task_id[ 1 ], Test_task, 0 ); |
---|
58 | directive_failed( status, "rtems_task_start" ); |
---|
59 | |
---|
60 | puts( "Deleting initialization task" ); |
---|
61 | status = rtems_task_delete( RTEMS_SELF ); |
---|
62 | directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); |
---|
63 | } |
---|