source: rtems/testsuites/libtests/monitor02/init.c @ 9c22907

4.104.115
Last change on this file since 9c22907 was 9c22907, checked in by Chris Johns <chrisj@…>, on 05/18/09 at 23:50:10

2009-05-19 Chris Johns <chrisj@…>

  • cpuuse/tswitch.c: Lower sample count for small memory targets.
  • cpuuse/system.h: Smaller stack size for small memory targets.
  • monitor02/init.c: Cannot run on small memory targets.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  This is a simple test whose only purpose is to start the Monitor
3 *  task.  The Monitor task can be used to obtain information about
4 *  a variety of RTEMS objects.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#define CONFIGURE_INIT
17#include "bsp.h"
18#include "system.h"
19
20#include <rtems/shell.h>
21#include <rtems/shellconfig.h>
22#define MAX_ARGS 128
23
24char        *Commands[] = {
25  "task",
26  "task 32",
27  NULL
28};
29rtems_task Init(
30  rtems_task_argument argument
31)
32{
33#if !BSP_SMALL_MEMORY
34  uint32_t           index;
35  rtems_status_code  status;
36  int                i;
37  int                argc;
38  char               *argv[MAX_ARGS];
39  char               tmp[256];
40 
41  puts( "\n*** START OF MONITOR02 ***\n");
42 
43  for (i=0; i < MAX_ARGS && Commands[i] ; i++) {
44    strcpy( tmp, Commands[i] );
45    if (!rtems_shell_make_args(tmp, &argc, argv, MAX_ARGS) ) {
46      printf( "===> %s\n", Commands[i] );
47      rtems_shell_main_monitor(argc, argv);
48    }
49  }
50  puts( "\n*** END OF MONITOR02 ***\n");
51#else
52  puts( "TARGET MEMORY TOO SMALL TO RUN\n\n");
53#endif
54  rtems_test_exit(0);
55}
Note: See TracBrowser for help on using the repository browser.