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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [tests/] [libtests/] [rtems++/] [Init.cc] - Blame information for rev 373

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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-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.OARcorp.com/rtems/license.html.
20
 *
21
 *  $Id: Init.cc,v 1.2 2001-09-27 12:02:13 chris Exp $
22
 */
23
 
24
#define TEST_INIT
25
#include "System.h"
26
 
27
// make global so it lasts past the Init task's stack's life time
28
Task1 task_1;
29
 
30
rtems_task Init(rtems_task_argument )
31
{
32
  puts( "\n\n*** RTEMS++ TEST ***" );
33
 
34
  printf( "INIT - Task.create() - " );
35
  task_1.create("TA1 ", 0, RTEMS_MINIMUM_STACK_SIZE);
36
  printf("%s\n", task_1.last_status_string());
37
 
38
  printf( "INIT - Task.create() - " );
39
  task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
40
  printf("%s\n", task_1.last_status_string());
41
 
42
  printf( "INIT - Task.create() - " );
43
  task_1.create("TA1 ", 10, RTEMS_MINIMUM_STACK_SIZE * 6);
44
  printf("%s\n", task_1.last_status_string());
45
 
46
  printf( "INIT - Task.restart() - " );
47
  task_1.restart(0);
48
  printf("%s\n", task_1.last_status_string());
49
 
50
  printf( "INIT - Task.start(0xDEADDEAD) - " );
51
  task_1.start(0xDEADDEAD);
52
  printf("%s\n", task_1.last_status_string());
53
 
54
  printf("INIT - Destroy it's self\n");
55
 
56
  // needs to be in C, no C++ object owns the Init task
57
  rtems_status_code status  = rtems_task_delete( RTEMS_SELF );
58
  directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
59
}
60
 
61
 
62
 

powered by: WebSVN 2.1.0

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