Changeset e340e96 in rtems-schedsim


Ignore:
Timestamp:
May 26, 2014, 5:46:20 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
246b81f
Parents:
ebc54d0
Message:

current_cpu is now a shared SMP command

Location:
schedsim/shell
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • schedsim/shell/schedsim_smppriority/Makefile.am

    rebc54d0 re340e96  
    33SOURCES  = config.c
    44SOURCES += $(srcdir)/../schedsim_smpsimple/add_commands.c
    5 SOURCES += $(srcdir)/../schedsim_smpsimple/main_current_cpu.c
    65SOURCES += $(srcdir)/../schedsim_smpsimple/main_dispatch.c
    76SOURCES += $(srcdir)/../schedsim_smpsimple/main_dump_ready_tasks.c
  • schedsim/shell/schedsim_smppriority_affinity/Makefile.am

    rebc54d0 re340e96  
    33SOURCES  = config.c
    44SOURCES += $(srcdir)/../schedsim_smpsimple/add_commands.c
    5 SOURCES += $(srcdir)/../schedsim_smpsimple/main_current_cpu.c
    65SOURCES += $(srcdir)/../schedsim_smpsimple/main_dispatch.c
    76SOURCES += $(srcdir)/../schedsim_smpsimple/main_dump_ready_tasks.c
  • schedsim/shell/schedsim_smpsimple/Makefile.am

    rebc54d0 re340e96  
    33schedsim_smpsimple_SOURCES += add_commands.c
    44schedsim_smpsimple_SOURCES += config.c
    5 schedsim_smpsimple_SOURCES += main_current_cpu.c
    65schedsim_smpsimple_SOURCES += main_dispatch.c
    76schedsim_smpsimple_SOURCES += main_dump_ready_tasks.c
  • schedsim/shell/schedsim_smpsimple/add_commands.c

    rebc54d0 re340e96  
    1919
    2020extern int main_dump_ready_tasks(int argc, char **argv);
    21 extern int main_set_current_cpu(int argc, char **argv);
    2221extern int main_dispatch(int argc, char **argv);
    2322
     
    3534
    3635  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(
    4536    "dispatch",
    4637    "rtems",
  • schedsim/shell/shared/Makefile.am

    rebc54d0 re340e96  
    5454if HAS_SMP
    5555libschedsim_a_SOURCES += smp_stub.c
     56libschedsim_a_SOURCES += main_currentcpu.c
    5657libschedsim_a_SOURCES += main_taskgetaffinity.c
    5758libschedsim_a_SOURCES += main_tasksetaffinity.c
  • schedsim/shell/shared/commands.c

    rebc54d0 re340e96  
    3535  extern rtems_shell_cmd_t rtems_shell_TASK_GET_AFFINITY_Command;
    3636  extern rtems_shell_cmd_t rtems_shell_TASK_SET_AFFINITY_Command;
     37  extern rtems_shell_cmd_t rtems_shell_CURRENT_CPU_Command;
    3738#endif
    3839
     
    6667    &rtems_shell_TASK_GET_AFFINITY_Command,
    6768    &rtems_shell_TASK_SET_AFFINITY_Command,
     69    &rtems_shell_CURRENT_CPU_Command,
    6870  #endif
    6971
  • schedsim/shell/shared/main_currentcpu.c

    rebc54d0 re340e96  
     1/**
     2 *  @file
     3 *  @brief current_cpu Command in Scheduler Simulator
     4 */
     5
    16/*
    2  *  COPYRIGHT (c) 1989-2013.
     7 *  COPYRIGHT (c) 1989-2014.
    38 *  On-Line Applications Research Corporation (OAR).
    49 *
     
    2429extern uint32_t Schedsim_Current_cpu;
    2530
    26 int main_set_current_cpu(int argc, char **argv)
     31int rtems_shell_main_current_cpu(int argc, char **argv)
    2732{
    2833  long cpu;
     
    4550  return 0;
    4651}
     52
     53rtems_shell_cmd_t rtems_shell_CURRENT_CPU_Command = {
     54  "current_cpu",                 /* name */
     55  "current_cpu [cpu]",           /* usage */
     56  "rtems",                       /* topic */
     57  rtems_shell_main_current_cpu,  /* command */
     58  NULL,                          /* alias */
     59  NULL                           /* next */
     60};
Note: See TracChangeset for help on using the changeset viewer.