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

5
Last change on this file since af43554 was af43554, checked in by Sebastian Huber <sebastian.huber@…>, on 10/26/17 at 11:59:11

tests: Remove TEST_INIT

The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

Update #3170.
Update #3199.

  • 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-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.rtems.org/license/LICENSE.
20 */
21
22#ifdef HAVE_CONFIG_H
23#include "config.h"
24#endif
25
26#define CONFIGURE_INIT
27#include "system.h"
28
29const char rtems_test_name[] = "SPSIZE";
30
31/* #define HAVE_MENU */
32
33void size_rtems( int mode );
34
35rtems_task Init(
36  rtems_task_argument argument
37)
38{
39#if defined(HAVE_MENU)
40  int choice = 0;
41#endif
42
43  setvbuf(stdout, 0, _IONBF, 0);
44
45  TEST_BEGIN();
46  size_rtems( 1 );
47  TEST_END();
48  rtems_test_exit( 0 );
49#if defined(HAVE_MENU)
50  do {
51    printf( "\n\nPlease select program mode:\n" );
52    printf( "  1) Print Formulas\n" );
53    printf( "  2) Determine Workspace Size\n" );
54    printf( "  3) Exit\n" );
55    printf( "Enter number of choice (1,2,3) : " );
56
57    choice = getint();
58    switch( choice ) {
59      case 1: size_rtems( 1 );  break;
60      case 2: size_rtems( 0 );  break;
61      case 3: rtems_test_exit( 0 );
62      default:  continue;
63    }
64  } while ( FOREVER );
65#endif
66}
Note: See TracBrowser for help on using the repository browser.