source: rtems-schedsim/schedsim/shell/schedsim_smpsimple/add_commands.c @ a2aad55

Last change on this file since a2aad55 was a2aad55, checked in by Joel Sherrill <joel.sherrill@…>, on 05/01/13 at 00:41:56

Remove CVS $

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2013.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 */
9
10#include <newlib/getopt.h>
11#include <stdio.h>
12#include <stdlib.h>
13#include <string.h>
14#include <ctype.h>
15#include <assert.h>
16
17#include "shell.h"
18#include "rtems_sched.h"
19
20extern int main_dump_ready_tasks(int argc, char **argv);
21extern int main_dump_all_cpus(int argc, char **argv);
22extern int main_set_current_cpu(int argc, char **argv);
23extern int main_dispatch(int argc, char **argv);
24
25void add_commands(void)
26{
27  rtems_shell_cmd_t *cmd;
28
29  cmd = rtems_shell_add_cmd(
30    "ready_tasks",
31    "rtems",
32    "no args",
33    main_dump_ready_tasks
34  );
35  assert( cmd );
36
37  cmd = rtems_shell_add_cmd(
38    "cpus",
39    "rtems",
40    "no args",
41    main_dump_all_cpus
42  );
43  assert( cmd );
44
45  cmd = rtems_shell_add_cmd(
46    "current_cpu",
47    "rtems",
48    "number",
49    main_set_current_cpu
50  );
51  assert( cmd );
52
53  cmd = rtems_shell_add_cmd(
54    "dispatch",
55    "rtems",
56    "",
57    main_dispatch
58  );
59  assert( cmd );
60
61}
Note: See TracBrowser for help on using the repository browser.