source: rtems/testsuites/libtests/rtems++/Init.cc @ 60b791ad

4.104.114.84.95
Last change on this file since 60b791ad was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:46:28

updated copyright to 1998

  • 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 *
5 *  Input parameters:
6 *    argument - task argument
7 *
8 *  Output parameters:  NONE
9 *
10 *  COPYRIGHT (c) 1997
11 *  Objective Design Systems Ltd Pty (ODS)
12 *  All rights reserved (R) Objective Design Systems Ltd Pty
13 *
14 *  COPYRIGHT (c) 1989-1998.
15 *  On-Line Applications Research Corporation (OAR).
16 *  Copyright assigned to U.S. Government, 1994.
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.OARcorp.com/rtems/license.html.
21 *
22 *  $Id$
23 */
24
25#define TEST_INIT
26#include "System.h"
27
28// make global so it lasts past the Init task's stack's life time
29Task1 task_1;
30
31rtems_task Init(rtems_task_argument )
32{
33  puts( "\n\n*** RTEMS++ TEST ***" );
34
35  printf( "INIT - Task.create() - " );
36  task_1.create("TA1 ", 0, RTEMS_MINIMUM_STACK_SIZE);
37  printf("%s\n", task_1.last_status_string());
38
39  printf( "INIT - Task.create() - " );
40  task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
41  printf("%s\n", task_1.last_status_string());
42
43  printf( "INIT - Task.create() - " );
44  task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
45  printf("%s\n", task_1.last_status_string());
46
47  printf( "INIT - Task.restart() - " );
48  task_1.restart(0);
49  printf("%s\n", task_1.last_status_string());
50
51  printf( "INIT - Task.start(0xDEADDEAD) - " );
52  task_1.start(0xDEADDEAD);
53  printf("%s\n", task_1.last_status_string());
54
55  printf("INIT - Destroy it's self\n");
56
57  // needs to be in C, no C++ object owns the Init task
58  rtems_status_code status  = rtems_task_delete( RTEMS_SELF );
59  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
60}
61
62
63
Note: See TracBrowser for help on using the repository browser.