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

Last change on this file since f40778b was f40778b, checked in by Joel Sherrill <joel.sherrill@…>, on 05/17/11 at 19:31:12

2011-05-17 Joel Sherrill <joel.sherrill@…>

  • .cvsignore, ChangeLog?, Makefile.am, README, TODO, add_commands.c, config.c, main_current_cpu.c, main_dispatch.c, main_dump_all_cpus.c, main_dump_ready_tasks.c, printheir_executing.c, schedsim.cc, smp_stub.c, wrap_thread_dispatch.c, scenarios/.cvsignore, scenarios/cpus1_mode.expected, scenarios/cpus1_mode.scen, scenarios/cpus1_priority.expected, scenarios/cpus1_priority.scen, scenarios/cpus1_resume_on_primary.expected, scenarios/cpus1_resume_on_primary.scen, scenarios/cpus1_suspend_on_primary.expected, scenarios/cpus1_suspend_on_primary.scen, scenarios/cpus4_mode_case1.expected, scenarios/cpus4_mode_case1.scen, scenarios/cpus4_mode_case2.expected, scenarios/cpus4_mode_case2.scen, scenarios/cpus4_nonpreempt_case1.expected, scenarios/cpus4_nonpreempt_case1.scen, scenarios/cpus4_pick_older.expected, scenarios/cpus4_pick_older.scen, scenarios/cpus4_priority.expected, scenarios/cpus4_priority.scen, scenarios/cpus4_simple_nopreempt.expected, scenarios/cpus4_simple_nopreempt.scen, scenarios/cpus4_simple_preemption.expected, scenarios/cpus4_simple_preemption.scen, scenarios/cpus4_suspend_on_all.expected, scenarios/cpus4_suspend_on_all.scen, scenarios/cpus4_suspend_on_primary.expected, scenarios/cpus4_suspend_on_primary.scen, scenarios/cpus4_suspend_on_secondary.expected, scenarios/cpus4_suspend_on_secondary.scen: New files.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
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 *  $Id$
10 */
11
12#include <newlib/getopt.h>
13#include <stdio.h>
14#include <stdlib.h>
15#include <string.h>
16#include <ctype.h>
17#include <assert.h>
18
19#include "shell.h"
20#include "rtems_sched.h"
21
22extern int main_dump_ready_tasks(int argc, char **argv);
23extern int main_dump_all_cpus(int argc, char **argv);
24extern int main_set_current_cpu(int argc, char **argv);
25extern int main_dispatch(int argc, char **argv);
26
27void add_commands(void)
28{
29  rtems_shell_cmd_t *cmd;
30
31  cmd = rtems_shell_add_cmd(
32    "ready_tasks",
33    "rtems",
34    "no args",
35    main_dump_ready_tasks
36  );
37  assert( cmd );
38
39  cmd = rtems_shell_add_cmd(
40    "cpus",
41    "rtems",
42    "no args",
43    main_dump_all_cpus
44  );
45  assert( cmd );
46
47  cmd = rtems_shell_add_cmd(
48    "current_cpu",
49    "rtems",
50    "number",
51    main_set_current_cpu
52  );
53  assert( cmd );
54
55  cmd = rtems_shell_add_cmd(
56    "dispatch",
57    "rtems",
58    "",
59    main_dispatch
60  );
61  assert( cmd );
62
63}
Note: See TracBrowser for help on using the repository browser.