diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-05-26 12:55:18 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-05-26 12:55:18 -0500 |
commit | 246b81f0202b684d5e2b4278fbbe364fee10edcf (patch) | |
tree | 62004509897d6fa49cafac5070ae4b83f664a5f7 /schedsim/shell/schedsim_smpsimple | |
parent | current_cpu is now a shared SMP command (diff) | |
download | rtems-schedsim-246b81f0202b684d5e2b4278fbbe364fee10edcf.tar.bz2 |
dispatch is now a shared SMP command
Diffstat (limited to 'schedsim/shell/schedsim_smpsimple')
-rw-r--r-- | schedsim/shell/schedsim_smpsimple/Makefile.am | 1 | ||||
-rw-r--r-- | schedsim/shell/schedsim_smpsimple/add_commands.c | 10 | ||||
-rw-r--r-- | schedsim/shell/schedsim_smpsimple/main_dispatch.c | 43 |
3 files changed, 0 insertions, 54 deletions
diff --git a/schedsim/shell/schedsim_smpsimple/Makefile.am b/schedsim/shell/schedsim_smpsimple/Makefile.am index a7c7237..b0f9bb1 100644 --- a/schedsim/shell/schedsim_smpsimple/Makefile.am +++ b/schedsim/shell/schedsim_smpsimple/Makefile.am @@ -2,7 +2,6 @@ bin_PROGRAMS = schedsim_smpsimple schedsim_smpsimple_SOURCES = schedsim_smpsimple_SOURCES += add_commands.c schedsim_smpsimple_SOURCES += config.c -schedsim_smpsimple_SOURCES += main_dispatch.c schedsim_smpsimple_SOURCES += main_dump_ready_tasks.c schedsim_smpsimple_SOURCES += printheir_executing.c schedsim_smpsimple_SOURCES += wrap_thread_dispatch.c diff --git a/schedsim/shell/schedsim_smpsimple/add_commands.c b/schedsim/shell/schedsim_smpsimple/add_commands.c index f975da7..1221df5 100644 --- a/schedsim/shell/schedsim_smpsimple/add_commands.c +++ b/schedsim/shell/schedsim_smpsimple/add_commands.c @@ -18,7 +18,6 @@ #include "rtems_sched.h" extern int main_dump_ready_tasks(int argc, char **argv); -extern int main_dispatch(int argc, char **argv); void add_commands(void) { @@ -31,13 +30,4 @@ void add_commands(void) main_dump_ready_tasks ); assert( cmd ); - - cmd = rtems_shell_add_cmd( - "dispatch", - "rtems", - "", - main_dispatch - ); - assert( cmd ); - } diff --git a/schedsim/shell/schedsim_smpsimple/main_dispatch.c b/schedsim/shell/schedsim_smpsimple/main_dispatch.c deleted file mode 100644 index 88c3856..0000000 --- a/schedsim/shell/schedsim_smpsimple/main_dispatch.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * COPYRIGHT (c) 1989-2013. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - */ - -#include <newlib/getopt.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> - -#include "shell.h" -#include "rtems_sched.h" - -#include <rtems.h> -#include <rtems/score/percpu.h> -#include <rtems/score/smp.h> -#include <rtems/score/schedulersimplesmp.h> -#include <rtems/score/threaddispatch.h> - -extern uint32_t Schedsim_Current_cpu; - -int main_dispatch(int argc, char **argv) -{ - uint32_t cpu; - uint32_t current_cpu; - - current_cpu = Schedsim_Current_cpu; - for ( cpu=0 ; cpu < _SMP_Processor_count ; cpu++ ) { - if ( _Per_CPU_Information[cpu].per_cpu.dispatch_necessary ) { - printf( "=== Invoke Thread Dispatch on CPU %d\n", cpu ); - Schedsim_Current_cpu = cpu; - _Thread_Dispatch(); - } - } - - Schedsim_Current_cpu = current_cpu; - return 0; -} |