From 4350081f85da91dd70cedde7f1fc086842b445f8 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 22 May 2014 10:19:24 -0500 Subject: cpus4_affinity_case1.scen: Specify affinity in hexadecimal --- .../scenarios/cpus4_affinity_case1.scen | 8 ++-- .../shell/schedsim_smpsimple/main_dump_all_cpus.c | 51 ---------------------- schedsim/shell/shared/main_dump_all_cpus.c | 51 ++++++++++++++++++++++ 3 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 schedsim/shell/schedsim_smpsimple/main_dump_all_cpus.c create mode 100644 schedsim/shell/shared/main_dump_all_cpus.c diff --git a/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_case1.scen b/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_case1.scen index e131502..563fcb1 100644 --- a/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_case1.scen +++ b/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_case1.scen @@ -2,10 +2,10 @@ # # rtems_init 4 -task_create smp1 4 -a 14 -task_create smp2 4 -a 14 -task_create smp3 4 -a 3 -task_create smp4 4 -a 3 +task_create smp1 4 -a 0xe +task_create smp2 4 -a 0xe +task_create smp3 4 -a 0x3 +task_create smp4 4 -a 0x3 # GOAL: want 0x0a010004 - 0x0a010001 as heir and executings # GOAL: on CPUs 0 -3 respectively diff --git a/schedsim/shell/schedsim_smpsimple/main_dump_all_cpus.c b/schedsim/shell/schedsim_smpsimple/main_dump_all_cpus.c deleted file mode 100644 index dfe3bc6..0000000 --- a/schedsim/shell/schedsim_smpsimple/main_dump_all_cpus.c +++ /dev/null @@ -1,51 +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 -#include -#include -#include -#include - -#include "shell.h" -#include "rtems_sched.h" - -// #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ -#include -#include -#include -#include - -int main_dump_all_cpus(int argc, char **argv) -{ - uint32_t cpu; - Thread_Control *h; - Thread_Control *i; - Thread_Control *e; - - printf( - "=== CPU Status\n" - " EXECUTING / HEIR / SWITCH NEEDED\n" - ); - for ( cpu=0 ; cpu < _SMP_Processor_count ; cpu++ ) { - e = _Per_CPU_Information[cpu].per_cpu.executing; - h = _Per_CPU_Information[cpu].per_cpu.heir; - printf( - " CPU %d: 0x%08x @%3ld / 0x%08x @%3ld %s\n", - cpu, - e->Object.id, (long) e->current_priority, - h->Object.id, (long) h->current_priority, - ((_Per_CPU_Information[cpu].per_cpu.dispatch_necessary) ? - "true" : "false") - ); - } - printf( "=== End of Ready Set of Threads\n" ); - - return 0; -} diff --git a/schedsim/shell/shared/main_dump_all_cpus.c b/schedsim/shell/shared/main_dump_all_cpus.c new file mode 100644 index 0000000..dfe3bc6 --- /dev/null +++ b/schedsim/shell/shared/main_dump_all_cpus.c @@ -0,0 +1,51 @@ +/* + * 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 +#include +#include +#include +#include + +#include "shell.h" +#include "rtems_sched.h" + +// #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ +#include +#include +#include +#include + +int main_dump_all_cpus(int argc, char **argv) +{ + uint32_t cpu; + Thread_Control *h; + Thread_Control *i; + Thread_Control *e; + + printf( + "=== CPU Status\n" + " EXECUTING / HEIR / SWITCH NEEDED\n" + ); + for ( cpu=0 ; cpu < _SMP_Processor_count ; cpu++ ) { + e = _Per_CPU_Information[cpu].per_cpu.executing; + h = _Per_CPU_Information[cpu].per_cpu.heir; + printf( + " CPU %d: 0x%08x @%3ld / 0x%08x @%3ld %s\n", + cpu, + e->Object.id, (long) e->current_priority, + h->Object.id, (long) h->current_priority, + ((_Per_CPU_Information[cpu].per_cpu.dispatch_necessary) ? + "true" : "false") + ); + } + printf( "=== End of Ready Set of Threads\n" ); + + return 0; +} -- cgit v1.2.3