source: rtems/testsuites/sptests/spsize/init.c @ 3235ad9

4.104.114.84.9
Last change on this file since 3235ad9 was ac7d5ef0, checked in by Joel Sherrill <joel.sherrill@…>, on May 11, 1995 at 5:39:37 PM

Initial revision

  • 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, 1990, 1991, 1992, 1993, 1994.
15 *  On-Line Applications Research Corporation (OAR).
16 *  All rights assigned to U.S. Government, 1994.
17 *
18 *  This material may be reproduced by or for the U.S. Government pursuant
19 *  to the copyright license under the clause at DFARS 252.227-7013.  This
20 *  notice must appear in all copies of this file and its derivatives.
21 *
22 *  $Id$
23 */
24
25#include "apps.h"
26#undef EXTERN
27#define EXTERN
28#include "conftbl.h"
29#include "gvar.h"
30
31rtems_task Test_task();
32void size_rtems( int mode );
33
34rtems_task Init(
35  rtems_task_argument argument
36)
37{
38  int choice;
39
40  setvbuf(stdout, 0, _IONBF, 0);
41
42  do {
43    puts( "\n*** RTEMS SIZE PROGRAM ***" );
44    printf( "\n\nPlease select program mode:\n" );
45    printf( "  1) Print Formulas\n" );
46    printf( "  2) Determine Workspace Size\n" );
47    printf( "  3) Exit\n" );
48    printf( "Enter number of choice (1,2,3) : " );
49
50    choice = getint();
51    switch( choice ) {
52      case 1: size_rtems( 1 );  break;
53      case 2: size_rtems( 0 );  break;
54      case 3: exit( 0 );
55      default:  continue;
56    }
57  } while ( FOREVER );
58}
Note: See TracBrowser for help on using the repository browser.