source: rtems/testsuites/sptests/spsize/init.c @ 98e4ebf

4.104.114.84.9
Last change on this file since 98e4ebf was 98e4ebf, checked in by Joel Sherrill <joel.sherrill@…>, on Oct 8, 1997 at 3:45:54 PM

Fixed typo in the pointer to the license terms.

  • Property mode set to 100644
File size: 1.5 KB
Line 
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-1997.
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/* #define HAVE_MENU */
29
30rtems_task Test_task();
31void size_rtems( int mode );
32
33rtems_task Init(
34  rtems_task_argument argument
35)
36{
37#if defined(HAVE_MENU)
38  int choice = 0;
39#endif
40
41  setvbuf(stdout, 0, _IONBF, 0);
42
43  puts( "\n*** RTEMS SIZE PROGRAM ***" );
44  size_rtems( 1 );
45  puts( "*** END OF RTEMS SIZE PROGRAM ***" );
46  exit( 0 );
47#if defined(HAVE_MENU)
48  do {
49    printf( "\n\nPlease select program mode:\n" );
50    printf( "  1) Print Formulas\n" );
51    printf( "  2) Determine Workspace Size\n" );
52    printf( "  3) Exit\n" );
53    printf( "Enter number of choice (1,2,3) : " );
54
55    choice = getint();
56    switch( choice ) {
57      case 1: size_rtems( 1 );  break;
58      case 2: size_rtems( 0 );  break;
59      case 3: exit( 0 );
60      default:  continue;
61    }
62  } while ( FOREVER );
63#endif
64}
Note: See TracBrowser for help on using the repository browser.