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

Last change on this file since cc1a54a was cc1a54a, checked in by Joel Sherrill <joel.sherrill@…>, on May 22, 2014 at 3:19:55 PM

Enhance cpus command to do validation of executing threads.

This patch enhances the cpus command such that it can take a list
of expected threads to be executing and validate that they are
executing on the expected cores.

The cpus command was moved to the shared directory.

The documentation was updated.

  • Property mode set to 100644
File size: 996 bytes
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_set_current_cpu(int argc, char **argv);
22extern int main_dispatch(int argc, char **argv);
23
24void add_commands(void)
25{
26  rtems_shell_cmd_t *cmd;
27
28  cmd = rtems_shell_add_cmd(
29    "ready_tasks",
30    "rtems",
31    "no args",
32    main_dump_ready_tasks
33  );
34  assert( cmd );
35
36  cmd = rtems_shell_add_cmd(
37    "current_cpu",
38    "rtems",
39    "number",
40    main_set_current_cpu
41  );
42  assert( cmd );
43
44  cmd = rtems_shell_add_cmd(
45    "dispatch",
46    "rtems",
47    "",
48    main_dispatch
49  );
50  assert( cmd );
51
52}
Note: See TracBrowser for help on using the repository browser.