[rtems-schedsim commit] schedsim_smpsimple: Add cpus4_inherit_priority.

Jennifer Averett jennifer at rtems.org
Fri May 23 19:06:46 UTC 2014


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

Author:    Jennifer Averett <jennifer.averett at oarcorp.com>
Date:      Fri May 23 14:12:52 2014 -0500

schedsim_smpsimple: Add cpus4_inherit_priority.

---

 .../scenarios/cpus4_inherit_priority.scen          |   24 ++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/schedsim/shell/schedsim_smpsimple/scenarios/cpus4_inherit_priority.scen b/schedsim/shell/schedsim_smpsimple/scenarios/cpus4_inherit_priority.scen
new file mode 100644
index 0000000..c9a705a
--- /dev/null
+++ b/schedsim/shell/schedsim_smpsimple/scenarios/cpus4_inherit_priority.scen
@@ -0,0 +1,24 @@
+#
+#  Verify we select the oldest task at a priority
+#
+rtems_init 4
+task_create smp1 8
+task_create smp2 8
+task_create smp3 8
+task_create smp4 8
+# GOAL: Tasks 0x0a010001 - 0x0a010004 as heir and executing
+# GOAL:    on CPUs 3 - 0 respectively
+cpus smp4 smp3 smp2 smp1
+
+# sem1 is binary semaphore (e.g. mutex) with priority ceiling of 5 
+semaphore_create -b -p -C 5 -V 1 sem1
+cpus smp4 smp3 smp2 smp1
+
+semaphore_obtain sem1 0
+
+# This should show smp4 has inherited a priority of 5
+cpus smp4 smp3 smp2 smp1
+
+semaphore_release sem1
+# This should show smp1 has its original priority of 8
+cpus smp4 smp3 smp2 smp1




More information about the vc mailing list