[rtems-schedsim commit] schedsim_smppriority: New simulator instance

Joel Sherrill joel at rtems.org
Wed May 14 14:47:38 UTC 2014


Module:    rtems-schedsim
Branch:    master
Commit:    26560c4103e210b182a2fa51274a0342ae81d7bc
Changeset: http://git.rtems.org/rtems-schedsim/commit/?id=26560c4103e210b182a2fa51274a0342ae81d7bc

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed May 14 08:14:48 2014 -0500

schedsim_smppriority: New simulator instance

---

 schedsim/configure.ac                           |    1 +
 schedsim/shell/Makefile.am                      |    2 +
 schedsim/shell/schedsim_smppriority/Makefile.am |   50 +++++++++++++++++++++++
 schedsim/shell/schedsim_smppriority/config.c    |   18 ++++++++
 4 files changed, 71 insertions(+), 0 deletions(-)

diff --git a/schedsim/configure.ac b/schedsim/configure.ac
index 8012b2f..727b994 100644
--- a/schedsim/configure.ac
+++ b/schedsim/configure.ac
@@ -187,5 +187,6 @@ shell/Makefile
 shell/shared/Makefile
 shell/schedsim_priority/Makefile
 shell/schedsim_smpsimple/Makefile
+shell/schedsim_smppriority/Makefile
 ])
 AC_OUTPUT
diff --git a/schedsim/shell/Makefile.am b/schedsim/shell/Makefile.am
index 2e819bc..2df602d 100644
--- a/schedsim/shell/Makefile.am
+++ b/schedsim/shell/Makefile.am
@@ -6,6 +6,8 @@ DIST_SUBDIRS = shared schedsim_priority
 if HAS_SMP
 SUBDIRS += schedsim_smpsimple
 DIST_SUBDIRS += schedsim_smpsimple
+SUBDIRS += schedsim_smppriority
+DIST_SUBDIRS += schedsim_smppriority
 endif
 
 include $(top_srcdir)/../automake/subdirs.am
diff --git a/schedsim/shell/schedsim_smppriority/Makefile.am b/schedsim/shell/schedsim_smppriority/Makefile.am
new file mode 100644
index 0000000..28ec6cf
--- /dev/null
+++ b/schedsim/shell/schedsim_smppriority/Makefile.am
@@ -0,0 +1,50 @@
+bin_PROGRAMS = schedsim_smppriority
+
+SOURCES  = config.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/add_commands.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/main_current_cpu.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/main_dispatch.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/main_dump_all_cpus.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/main_dump_ready_tasks.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/printheir_executing.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/smp_stub.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/wrap_thread_dispatch.c
+SOURCES += $(srcdir)/../schedsim_smpsimple/schedsim.cc
+schedsim_smppriority_SOURCES = $(SOURCES)
+
+cpukitdir=@rtems_srcdir@/cpukit
+schedsim_smppriority_CPPFLAGS  = -I$(top_builddir)/score/include
+schedsim_smppriority_CPPFLAGS += -I$(srcdir)/sched_cpu
+schedsim_smppriority_CPPFLAGS += -I$(srcdir)/../../rtems
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/include
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/score/include
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/score/inline
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/rtems/include
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/rtems/inline
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/sapi/include
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/sapi/inline
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/libcsupport/include
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/libmisc/stringto
+schedsim_smppriority_CPPFLAGS += -I$(srcdir)/../../rtems/sched_cpu
+schedsim_smppriority_CPPFLAGS += -I$(srcdir)/../shared/include
+schedsim_smppriority_CPPFLAGS += -I$(srcdir)/../shared
+if HAS_PTHREADS
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/posix/include
+schedsim_smppriority_CPPFLAGS += -I$(cpukitdir)/posix/inline
+endif
+## Ensure all linker provided symbols are available
+schedsim_smppriority_LDFLAGS = 
+schedsim_smppriority_LDFLAGS += -Wl,--defsym=_TLS_Data_begin=0
+schedsim_smppriority_LDFLAGS += -Wl,--defsym=_TLS_BSS_end=0
+schedsim_smppriority_LDFLAGS += -Wl,--defsym=_TLS_Alignment=4
+
+## Wrap _Thread_Dispatch so we can see context switches
+schedsim_smppriority_LDFLAGS +=-Wl,--wrap=_Thread_Dispatch
+
+## schedsim_smppriority_LDADD +=-Wl,--start-group
+schedsim_smppriority_LDADD = ../shared/libschedsim.a
+schedsim_smppriority_LDADD += ../../rtems/librtems.a
+schedsim_smppriority_LDADD += ../shared/libschedsim.a
+## schedsim_smppriority_LDADD +=-Wl,--end-group
+
+include $(top_srcdir)/../automake/host.am
diff --git a/schedsim/shell/schedsim_smppriority/config.c b/schedsim/shell/schedsim_smppriority/config.c
new file mode 100644
index 0000000..04d00d2
--- /dev/null
+++ b/schedsim/shell/schedsim_smppriority/config.c
@@ -0,0 +1,18 @@
+/**
+ * @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_SMP_APPLICATION
+#define CONFIGURE_SMP_MAXIMUM_PROCESSORS 4
+#define CONFIGURE_SCHEDULER_PRIORITY_SMP
+
+#define CONFIGURE_DISABLE_BSP_SETTINGS
+#include <rtems/confdefs.h>




More information about the vc mailing list