[rtems-schedsim commit] Add Simulator for Uniprocessor Simple Priority

Joel Sherrill joel at rtems.org
Tue May 27 15:34:43 UTC 2014


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

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Tue May 27 10:42:54 2014 -0500

Add Simulator for Uniprocessor Simple Priority

---

 schedsim/configure.ac                      |    1 +
 schedsim/rtems/Makefile.am                 |    1 +
 schedsim/shell/Makefile.am                 |    4 +-
 schedsim/shell/schedsim_simple/Makefile.am |   49 ++++++++++++++++++++++++++++
 schedsim/shell/schedsim_simple/config.c    |    9 +++++
 5 files changed, 62 insertions(+), 2 deletions(-)

diff --git a/schedsim/configure.ac b/schedsim/configure.ac
index 5e99a20..bd1f41e 100644
--- a/schedsim/configure.ac
+++ b/schedsim/configure.ac
@@ -188,6 +188,7 @@ rtems/Makefile
 shell/Makefile
 shell/shared/Makefile
 shell/schedsim_priority/Makefile
+shell/schedsim_simple/Makefile
 shell/schedsim_smpsimple/Makefile
 shell/schedsim_smppriority/Makefile
 shell/schedsim_smppriority_affinity/Makefile
diff --git a/schedsim/rtems/Makefile.am b/schedsim/rtems/Makefile.am
index 7b14d98..53e774d 100644
--- a/schedsim/rtems/Makefile.am
+++ b/schedsim/rtems/Makefile.am
@@ -104,6 +104,7 @@ librtems_a_SOURCES += $(cpukitdir)/score/src/schedulerpriorityyield.c
 # Uniprocessor Scheduler Simple
 librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimpleblock.c
 librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimple.c
+librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimplechangepriority.c
 librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimpleschedule.c
 librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimpleunblock.c
 librtems_a_SOURCES += $(cpukitdir)/score/src/schedulersimpleyield.c
diff --git a/schedsim/shell/Makefile.am b/schedsim/shell/Makefile.am
index 11af9c5..d920e37 100644
--- a/schedsim/shell/Makefile.am
+++ b/schedsim/shell/Makefile.am
@@ -1,7 +1,7 @@
 ACLOCAL_AMFLAGS = -I ./../aclocal
 
-SUBDIRS = shared schedsim_priority
-DIST_SUBDIRS = shared schedsim_priority
+SUBDIRS = shared schedsim_priority schedsim_simple
+DIST_SUBDIRS = shared schedsim_priority schedsim_simple
 
 if HAS_SMP
 SUBDIRS += schedsim_smpsimple
diff --git a/schedsim/shell/schedsim_simple/Makefile.am b/schedsim/shell/schedsim_simple/Makefile.am
new file mode 100644
index 0000000..ed20f63
--- /dev/null
+++ b/schedsim/shell/schedsim_simple/Makefile.am
@@ -0,0 +1,49 @@
+bin_PROGRAMS = schedsim_simple
+schedsim_simple_SOURCES = config.c
+schedsim_simple_SOURCES += $(srcdir)/../shared/add_commands_stub.c
+
+cpukitdir=@rtems_srcdir@/cpukit
+schedsim_simple_CPPFLAGS  = -I$(top_builddir)/score/include
+schedsim_simple_CPPFLAGS += -I$(srcdir)/sched_cpu
+schedsim_simple_CPPFLAGS += -I$(srcdir)/../../rtems
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/include
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/score/include
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/score/inline
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/rtems/include
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/rtems/inline
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/sapi/include
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/sapi/inline
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/libcsupport/include
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/libmisc/stringto
+schedsim_simple_CPPFLAGS += -I$(srcdir)/../../rtems/sched_cpu
+schedsim_simple_CPPFLAGS += -I$(srcdir)/../shared/include
+schedsim_simple_CPPFLAGS += -I$(srcdir)/../shared
+if HAS_PTHREADS
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/posix/include
+schedsim_simple_CPPFLAGS += -I$(cpukitdir)/posix/inline
+endif
+
+## Ensure all linker provided symbols are available
+schedsim_simple_LDFLAGS = 
+schedsim_simple_LDFLAGS += -Wl,--defsym=_TLS_Data_begin=0
+schedsim_simple_LDFLAGS += -Wl,--defsym=_TLS_BSS_end=0
+schedsim_simple_LDFLAGS += -Wl,--defsym=_TLS_Alignment=4
+
+## Wrap _Thread_Dispatch so we can see context switches
+schedsim_simple_LDFLAGS += -Wl,--wrap=_Thread_Dispatch
+
+## Link in all support libraries
+## schedsim_simpleLDADD +=-Wl,--start-group
+schedsim_simple_LDADD = ../shared/libschedsim.a
+schedsim_simple_LDADD += ../../rtems/librtems.a
+schedsim_simple_LDADD += ../shared/libschedsim.a
+## schedsim_simple_LDADD +=-Wl,--end-group
+
+check-local:
+	@echo Running tests from Uniprocessor Deterministic Priority
+	$(srcdir)/../run_scenarios \
+	    -s $(builddir)/schedsim_simple \
+	    -S $(srcdir)/../schedsim_priority \
+	    -A
+
+include $(top_srcdir)/../automake/host.am
diff --git a/schedsim/shell/schedsim_simple/config.c b/schedsim/shell/schedsim_simple/config.c
new file mode 100644
index 0000000..5322dc1
--- /dev/null
+++ b/schedsim/shell/schedsim_simple/config.c
@@ -0,0 +1,9 @@
+#include <rtems.h>
+
+#define CONFIGURE_INIT
+#define CONFIGURE_MAXIMUM_TASKS             1000
+#define CONFIGURE_MAXIMUM_SEMAPHORES        1000
+
+#define CONFIGURE_SCHEDULER_SIMPLE
+#define CONFIGURE_DISABLE_BSP_SETTINGS
+#include <confdefs.h>




More information about the vc mailing list