diff options
author | Jennifer Averett <jennifer.averett@oarcorp.com> | 2014-06-17 12:03:25 -0500 |
---|---|---|
committer | Jennifer Averett <jennifer.averett@oarcorp.com> | 2014-06-17 12:03:25 -0500 |
commit | 6f48a61527f4fad2244d7d8bfa67795d042c7fef (patch) | |
tree | ecda4c9713a6fbaf0d1af8dbce438f8cd67b23d9 /schedsim/shell/schedsim_cluster01 | |
parent | rtems: Add _Thread_Yield support. (diff) | |
download | rtems-schedsim-6f48a61527f4fad2244d7d8bfa67795d042c7fef.tar.bz2 |
Add remainder of schedulers and cluster scheduler support.
Diffstat (limited to 'schedsim/shell/schedsim_cluster01')
-rw-r--r-- | schedsim/shell/schedsim_cluster01/Makefile.am | 61 | ||||
-rw-r--r-- | schedsim/shell/schedsim_cluster01/config.c | 47 |
2 files changed, 108 insertions, 0 deletions
diff --git a/schedsim/shell/schedsim_cluster01/Makefile.am b/schedsim/shell/schedsim_cluster01/Makefile.am new file mode 100644 index 0000000..9b70554 --- /dev/null +++ b/schedsim/shell/schedsim_cluster01/Makefile.am @@ -0,0 +1,61 @@ +bin_PROGRAMS = schedsim_cluster01 + +SOURCES = config.c +SOURCES += $(srcdir)/../schedsim_smpsimple/add_commands.c +SOURCES += $(srcdir)/../schedsim_smpsimple/main_dump_ready_tasks.c +schedsim_cluster01_SOURCES = $(SOURCES) + +cpukitdir=@rtems_srcdir@/cpukit +schedsim_cluster01_CPPFLAGS = -I$(top_builddir)/score/include +schedsim_cluster01_CPPFLAGS += -I$(srcdir)/sched_cpu +schedsim_cluster01_CPPFLAGS += -I$(srcdir)/../../rtems +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/include +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/score/include +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/score/inline +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/rtems/include +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/rtems/inline +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/sapi/include +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/sapi/inline +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/libcsupport/include +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/libmisc/stringto +schedsim_cluster01_CPPFLAGS += -I$(srcdir)/../../rtems/sched_cpu +schedsim_cluster01_CPPFLAGS += -I$(srcdir)/../shared/include +schedsim_cluster01_CPPFLAGS += -I$(srcdir)/../shared +if HAS_PTHREADS +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/posix/include +schedsim_cluster01_CPPFLAGS += -I$(cpukitdir)/posix/inline +endif +## Ensure all linker provided symbols are available +schedsim_cluster01_LDFLAGS = +schedsim_cluster01_LDFLAGS += -Wl,--defsym=_TLS_Data_begin=0 +schedsim_cluster01_LDFLAGS += -Wl,--defsym=_TLS_BSS_end=0 +schedsim_cluster01_LDFLAGS += -Wl,--defsym=_TLS_Alignment=4 + +## Wrap _Thread_Dispatch so we can see context switches +schedsim_cluster01_LDFLAGS +=-Wl,--wrap=_Thread_Dispatch + +## schedsim_cluster01_LDADD +=-Wl,--start-group +schedsim_cluster01_LDADD = ../shared/libschedsim.a +schedsim_cluster01_LDADD += ../../rtems/librtems.a +schedsim_cluster01_LDADD += ../shared/libschedsim.a +## schedsim_cluster01_LDADD +=-Wl,--end-group + +check-local: + @echo Running tests from SMP Priority Affinity + $(srcdir)/../run_scenarios \ + -s $(builddir)/schedsim_cluster01 \ + -S $(srcdir) \ + -A + @echo Running tests from SMP Simple Priority + $(srcdir)/../run_scenarios \ + -s $(builddir)/schedsim_cluster01 \ + -S $(srcdir)/../schedsim_smpsimple \ + -A + @echo Running tests from Uniprocessor Deterministic Priority + $(srcdir)/../run_scenarios \ + -s $(builddir)/schedsim_cluster01 \ + -S $(srcdir)/../schedsim_priority \ + script02.scen script04.scen script05.scen script06.scen + + +include $(top_srcdir)/../automake/host.am diff --git a/schedsim/shell/schedsim_cluster01/config.c b/schedsim/shell/schedsim_cluster01/config.c new file mode 100644 index 0000000..ab1bcbc --- /dev/null +++ b/schedsim/shell/schedsim_cluster01/config.c @@ -0,0 +1,47 @@ +/** + * @file + * + * Configuration file for Scheduler Simulator using Priority SMP + */ + +#include <rtems.h> + +#define CONFIGURE_INIT +#define CONFIGURE_MAXIMUM_TASKS 1000 +#define CONFIGURE_MAXIMUM_SEMAPHORES 1000 + +#define CONFIGURE_MAXIMUM_PRIORITY 255 + +#define CONFIGURE_SMP_APPLICATION +#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4 +#define CONFIGURE_SCHEDULER_PRIORITY_SMP +#define CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP + +#include <rtems/scheduler.h> +#include <schedsim_shell.h> + +shell_scheduler_name shell_scheduler_list[] = { +"Priority SMP Scheduler", +"Priority Affinity SMP Scheduler", +"" +}; + +RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(a, CONFIGURE_MAXIMUM_PRIORITY + 1); +RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP( + b, + CONFIGURE_MAXIMUM_PRIORITY + 1 +); + +#define CONFIGURE_SCHEDULER_CONTROLS \ + RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(a, SCHED_NAME(0)), \ + RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP(b, SCHED_NAME(1)) + +#define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \ + RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \ + RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ + RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \ + RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL) + + +#define CONFIGURE_DISABLE_BSP_SETTINGS +#include <rtems/confdefs.h> |