source: rtems/testsuites/sptests/spsize/init.c @ de4f281

4.104.114.84.9
Last change on this file since de4f281 was de4f281, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 7, 1997 at 9:31:59 PM

added ifdef to avoid warning for unused variable.

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[ac7d5ef0]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
[3a4ae6c]25#define TEST_INIT
26#include "system.h"
[ac7d5ef0]27
[de4f281]28/* #define HAVE_MENU */
29
[ac7d5ef0]30rtems_task Test_task();
31void size_rtems( int mode );
32
33rtems_task Init(
34  rtems_task_argument argument
35)
36{
[de4f281]37#if defined(HAVE_MENU)
38  int choice = 0;
39#endif
[ac7d5ef0]40
41  setvbuf(stdout, 0, _IONBF, 0);
42
[9700578]43  puts( "\n*** RTEMS SIZE PROGRAM ***" );
44  size_rtems( 1 );
45  puts( "*** END OF RTEMS SIZE PROGRAM ***" );
46  exit( 0 );
[de4f281]47#if defined(HAVE_MENU)
[ac7d5ef0]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 );
[9700578]63#endif
[ac7d5ef0]64}
Note: See TracBrowser for help on using the repository browser.