summaryrefslogtreecommitdiffstats
path: root/schedsim/shell/schedsim_priority/scenarios/inherit_priority.scen
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2014-06-03 07:23:55 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2014-06-03 07:23:55 -0500
commit4be3859c6e0bef1b2c8cf25ccdaf1f43e5486153 (patch)
tree3532ab143169b05db7717977fb8c7013d4733e63 /schedsim/shell/schedsim_priority/scenarios/inherit_priority.scen
parentAdd Simulator for Uniprocessor Simple Priority (diff)
downloadrtems-schedsim-4be3859c6e0bef1b2c8cf25ccdaf1f43e5486153.tar.bz2
schedsim_priority: Add priority inheritance scenario.
Diffstat (limited to '')
-rw-r--r--schedsim/shell/schedsim_priority/scenarios/inherit_priority.scen25
1 files changed, 25 insertions, 0 deletions
diff --git a/schedsim/shell/schedsim_priority/scenarios/inherit_priority.scen b/schedsim/shell/schedsim_priority/scenarios/inherit_priority.scen
new file mode 100644
index 0000000..ea1e72b
--- /dev/null
+++ b/schedsim/shell/schedsim_priority/scenarios/inherit_priority.scen
@@ -0,0 +1,25 @@
+#
+# Verify priority inheritance with a priority ceiling mutex
+#
+echo "*** TEST INHERIT PRIORITY ***"
+rtems_init
+echo "=== Create 0x0a010001 at priority 8 ==="
+task_create smp1 8
+cpus smp1
+
+# sem1 is binary semaphore (e.g. mutex) with priority ceiling of 5
+echo "Create mutex with priority ceiling of 5
+semaphore_create -b -p -C 5 -V 1 sem1
+cpus smp1
+
+semaphore_obtain sem1 0
+
+# This should show smp4 has inherited a priority of 5
+echo "smp1 should inherit a priority of 5
+cpus smp1
+
+semaphore_release sem1
+# This should show smp1 has its original priority of 8
+echo "smp1 should return to a priority of 8
+cpus smp1
+echo "*** END OF TEST INHERIT PRIORITY ***"