From 9077d3c2e4eeac466871dfc4a46e87b52012697f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 17 May 2011 19:31:08 +0000 Subject: 2011-05-17 Joel Sherrill * Makefile.am: Merge and update code. Simulators for Deterministic Priority and SMP Simple Schedulers now work. * ChangeLog, smp_stub.c, scenarios/script01.expected, scenarios/script01.output, scenarios/script01.scen, scenarios/script02.expected, scenarios/script02.output, scenarios/script02.scen, scenarios/script03.expected, scenarios/script03.output, scenarios/script03.scen, scenarios/script04.expected, scenarios/script04.output, scenarios/script04.scen, scenarios/script05.expected, scenarios/script05.output, scenarios/script05.scen, scenarios/script06.expected, scenarios/script06.output, scenarios/script06.scen: New files. * scenarios/script01, scenarios/script02, scenarios/script03, scenarios/script04, scenarios/script05, scenarios/script06: Removed. --- .../shell/schedsim_priority/scenarios/script01 | 11 ------ .../schedsim_priority/scenarios/script01.expected | 22 +++++++++++ .../schedsim_priority/scenarios/script01.output | 22 +++++++++++ .../schedsim_priority/scenarios/script01.scen | 11 ++++++ .../shell/schedsim_priority/scenarios/script02 | 9 ----- .../schedsim_priority/scenarios/script02.expected | 22 +++++++++++ .../schedsim_priority/scenarios/script02.output | 22 +++++++++++ .../schedsim_priority/scenarios/script02.scen | 9 +++++ .../shell/schedsim_priority/scenarios/script03 | 19 --------- .../schedsim_priority/scenarios/script03.expected | 26 +++++++++++++ .../schedsim_priority/scenarios/script03.output | 26 +++++++++++++ .../schedsim_priority/scenarios/script03.scen | 19 +++++++++ .../shell/schedsim_priority/scenarios/script04 | 10 ----- .../schedsim_priority/scenarios/script04.expected | 21 ++++++++++ .../schedsim_priority/scenarios/script04.output | 21 ++++++++++ .../schedsim_priority/scenarios/script04.scen | 10 +++++ .../shell/schedsim_priority/scenarios/script05 | 22 ----------- .../schedsim_priority/scenarios/script05.expected | 45 ++++++++++++++++++++++ .../schedsim_priority/scenarios/script05.output | 45 ++++++++++++++++++++++ .../schedsim_priority/scenarios/script05.scen | 22 +++++++++++ .../shell/schedsim_priority/scenarios/script06 | 14 ------- .../schedsim_priority/scenarios/script06.expected | 27 +++++++++++++ .../schedsim_priority/scenarios/script06.output | 27 +++++++++++++ .../schedsim_priority/scenarios/script06.scen | 14 +++++++ 24 files changed, 411 insertions(+), 85 deletions(-) delete mode 100644 schedsim/shell/schedsim_priority/scenarios/script01 create mode 100644 schedsim/shell/schedsim_priority/scenarios/script01.expected create mode 100644 schedsim/shell/schedsim_priority/scenarios/script01.output create mode 100644 schedsim/shell/schedsim_priority/scenarios/script01.scen delete mode 100644 schedsim/shell/schedsim_priority/scenarios/script02 create mode 100644 schedsim/shell/schedsim_priority/scenarios/script02.expected create mode 100644 schedsim/shell/schedsim_priority/scenarios/script02.output create mode 100644 schedsim/shell/schedsim_priority/scenarios/script02.scen delete mode 100644 schedsim/shell/schedsim_priority/scenarios/script03 create mode 100644 schedsim/shell/schedsim_priority/scenarios/script03.expected create mode 100644 schedsim/shell/schedsim_priority/scenarios/script03.output create mode 100644 schedsim/shell/schedsim_priority/scenarios/script03.scen delete mode 100644 schedsim/shell/schedsim_priority/scenarios/script04 create mode 100644 schedsim/shell/schedsim_priority/scenarios/script04.expected create mode 100644 schedsim/shell/schedsim_priority/scenarios/script04.output create mode 100644 schedsim/shell/schedsim_priority/scenarios/script04.scen delete mode 100644 schedsim/shell/schedsim_priority/scenarios/script05 create mode 100644 schedsim/shell/schedsim_priority/scenarios/script05.expected create mode 100644 schedsim/shell/schedsim_priority/scenarios/script05.output create mode 100644 schedsim/shell/schedsim_priority/scenarios/script05.scen delete mode 100644 schedsim/shell/schedsim_priority/scenarios/script06 create mode 100644 schedsim/shell/schedsim_priority/scenarios/script06.expected create mode 100644 schedsim/shell/schedsim_priority/scenarios/script06.output create mode 100644 schedsim/shell/schedsim_priority/scenarios/script06.scen (limited to 'schedsim/shell/schedsim_priority/scenarios') diff --git a/schedsim/shell/schedsim_priority/scenarios/script01 b/schedsim/shell/schedsim_priority/scenarios/script01 deleted file mode 100644 index 9a40dc3..0000000 --- a/schedsim/shell/schedsim_priority/scenarios/script01 +++ /dev/null @@ -1,11 +0,0 @@ -echo "*** TEST 01 ***" -rtems_init -echo "=== Create and delete 0x0a010001 ===" -task_create TA1 3 -task_delete TA1 -echo "=== Create and delete 0x0a010002 ===" -task_create TA1 3 -task_delete 0x0a010002 -echo "*** END OF TEST 01 ***" -exit -# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script01.expected b/schedsim/shell/schedsim_priority/scenarios/script01.expected new file mode 100644 index 0000000..8a18f29 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script01.expected @@ -0,0 +1,22 @@ +*** TEST 01 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +=== Create and delete 0x0a010001 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=3 +Task (TA1) starting: id=0x0a010001, priority=3 + Thread Heir: 0x0a010001 priority=3 + Thread Executing: 0x0a010001 priority=3 + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Task (0x0a010001) deleted +=== Create and delete 0x0a010002 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010002, priority=3 +Task (TA1) starting: id=0x0a010002, priority=3 + Thread Heir: 0x0a010002 priority=3 + Thread Executing: 0x0a010002 priority=3 + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Task (0x0a010002) deleted +*** END OF TEST 01 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script01.output b/schedsim/shell/schedsim_priority/scenarios/script01.output new file mode 100644 index 0000000..8a18f29 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script01.output @@ -0,0 +1,22 @@ +*** TEST 01 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +=== Create and delete 0x0a010001 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=3 +Task (TA1) starting: id=0x0a010001, priority=3 + Thread Heir: 0x0a010001 priority=3 + Thread Executing: 0x0a010001 priority=3 + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Task (0x0a010001) deleted +=== Create and delete 0x0a010002 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010002, priority=3 +Task (TA1) starting: id=0x0a010002, priority=3 + Thread Heir: 0x0a010002 priority=3 + Thread Executing: 0x0a010002 priority=3 + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Task (0x0a010002) deleted +*** END OF TEST 01 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script01.scen b/schedsim/shell/schedsim_priority/scenarios/script01.scen new file mode 100644 index 0000000..9a40dc3 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script01.scen @@ -0,0 +1,11 @@ +echo "*** TEST 01 ***" +rtems_init +echo "=== Create and delete 0x0a010001 ===" +task_create TA1 3 +task_delete TA1 +echo "=== Create and delete 0x0a010002 ===" +task_create TA1 3 +task_delete 0x0a010002 +echo "*** END OF TEST 01 ***" +exit +# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script02 b/schedsim/shell/schedsim_priority/scenarios/script02 deleted file mode 100644 index 294956c..0000000 --- a/schedsim/shell/schedsim_priority/scenarios/script02 +++ /dev/null @@ -1,9 +0,0 @@ -echo "*** TEST 02 ***" -rtems_init -echo "=== Create 0x0a010001 ===" -task_create TA1 1 -task_wake_after 5 -clock_tick 7 -echo "*** END OF TEST 2 ***" -exit -# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script02.expected b/schedsim/shell/schedsim_priority/scenarios/script02.expected new file mode 100644 index 0000000..49abf04 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script02.expected @@ -0,0 +1,22 @@ +*** TEST 02 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +=== Create 0x0a010001 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Task (0x0a010001) sleeping for 5 ticks + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +ClockTick (1) ... +ClockTick (2) ... +ClockTick (3) ... +ClockTick (4) ... +ClockTick (5) ... + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +ClockTick (6) ... +ClockTick (7) ... +*** END OF TEST 2 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script02.output b/schedsim/shell/schedsim_priority/scenarios/script02.output new file mode 100644 index 0000000..49abf04 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script02.output @@ -0,0 +1,22 @@ +*** TEST 02 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +=== Create 0x0a010001 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Task (0x0a010001) sleeping for 5 ticks + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +ClockTick (1) ... +ClockTick (2) ... +ClockTick (3) ... +ClockTick (4) ... +ClockTick (5) ... + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +ClockTick (6) ... +ClockTick (7) ... +*** END OF TEST 2 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script02.scen b/schedsim/shell/schedsim_priority/scenarios/script02.scen new file mode 100644 index 0000000..294956c --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script02.scen @@ -0,0 +1,9 @@ +echo "*** TEST 02 ***" +rtems_init +echo "=== Create 0x0a010001 ===" +task_create TA1 1 +task_wake_after 5 +clock_tick 7 +echo "*** END OF TEST 2 ***" +exit +# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script03 b/schedsim/shell/schedsim_priority/scenarios/script03 deleted file mode 100644 index a05ab26..0000000 --- a/schedsim/shell/schedsim_priority/scenarios/script03 +++ /dev/null @@ -1,19 +0,0 @@ -echo "*** TEST 03 ***" -rtems_init -echo "=== Create 0x0a010001 ===" -task_create TA1 1 -echo "** Mode - query" -task_mode -echo "** Mode - set no timeslicing" -task_mode -t -echo "** Mode - set timeslicing" -task_mode -T -echo "** Mode - set no timeslicing and no preempt" -task_mode -t -p -echo "** Mode - set timeslicing and preempt" -task_mode -T -P -echo "** Mode - query" -task_mode -echo "*** END OF TEST 03 ***" -exit -# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script03.expected b/schedsim/shell/schedsim_priority/scenarios/script03.expected new file mode 100644 index 0000000..dd3c96d --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script03.expected @@ -0,0 +1,26 @@ +*** TEST 03 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +=== Create 0x0a010001 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +** Mode - query +Previous Mode: Preemption: yes Timeslicing: no +** Mode - set no timeslicing +Previous Mode: Preemption: yes Timeslicing: no +Current Mode: Preemption: yes Timeslicing: no +** Mode - set timeslicing +Previous Mode: Preemption: yes Timeslicing: no +Current Mode: Preemption: yes Timeslicing: yes +** Mode - set no timeslicing and no preempt +Previous Mode: Preemption: yes Timeslicing: yes +Current Mode: Preemption: no Timeslicing: no +** Mode - set timeslicing and preempt +Previous Mode: Preemption: no Timeslicing: no +Current Mode: Preemption: yes Timeslicing: yes +** Mode - query +Previous Mode: Preemption: yes Timeslicing: yes +*** END OF TEST 03 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script03.output b/schedsim/shell/schedsim_priority/scenarios/script03.output new file mode 100644 index 0000000..dd3c96d --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script03.output @@ -0,0 +1,26 @@ +*** TEST 03 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +=== Create 0x0a010001 === +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +** Mode - query +Previous Mode: Preemption: yes Timeslicing: no +** Mode - set no timeslicing +Previous Mode: Preemption: yes Timeslicing: no +Current Mode: Preemption: yes Timeslicing: no +** Mode - set timeslicing +Previous Mode: Preemption: yes Timeslicing: no +Current Mode: Preemption: yes Timeslicing: yes +** Mode - set no timeslicing and no preempt +Previous Mode: Preemption: yes Timeslicing: yes +Current Mode: Preemption: no Timeslicing: no +** Mode - set timeslicing and preempt +Previous Mode: Preemption: no Timeslicing: no +Current Mode: Preemption: yes Timeslicing: yes +** Mode - query +Previous Mode: Preemption: yes Timeslicing: yes +*** END OF TEST 03 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script03.scen b/schedsim/shell/schedsim_priority/scenarios/script03.scen new file mode 100644 index 0000000..a05ab26 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script03.scen @@ -0,0 +1,19 @@ +echo "*** TEST 03 ***" +rtems_init +echo "=== Create 0x0a010001 ===" +task_create TA1 1 +echo "** Mode - query" +task_mode +echo "** Mode - set no timeslicing" +task_mode -t +echo "** Mode - set timeslicing" +task_mode -T +echo "** Mode - set no timeslicing and no preempt" +task_mode -t -p +echo "** Mode - set timeslicing and preempt" +task_mode -T -P +echo "** Mode - query" +task_mode +echo "*** END OF TEST 03 ***" +exit +# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script04 b/schedsim/shell/schedsim_priority/scenarios/script04 deleted file mode 100644 index 4eebcd7..0000000 --- a/schedsim/shell/schedsim_priority/scenarios/script04 +++ /dev/null @@ -1,10 +0,0 @@ -echo "*** TEST 04 ***" -rtems_init -echo Create 0x0a010001 -task_create TA1 1 -task_suspend TA1 -task_create TA1 2 -task_resume TA1 -echo "*** END OF TEST 04 ***" -exit -# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script04.expected b/schedsim/shell/schedsim_priority/scenarios/script04.expected new file mode 100644 index 0000000..664df89 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script04.expected @@ -0,0 +1,21 @@ +*** TEST 04 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Create 0x0a010001 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Suspending task (0x0a010001) + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010002, priority=2 +Task (TA1) starting: id=0x0a010002, priority=2 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Resuming task (0x0a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +*** END OF TEST 04 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script04.output b/schedsim/shell/schedsim_priority/scenarios/script04.output new file mode 100644 index 0000000..664df89 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script04.output @@ -0,0 +1,21 @@ +*** TEST 04 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Create 0x0a010001 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Suspending task (0x0a010001) + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010002, priority=2 +Task (TA1) starting: id=0x0a010002, priority=2 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Resuming task (0x0a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +*** END OF TEST 04 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script04.scen b/schedsim/shell/schedsim_priority/scenarios/script04.scen new file mode 100644 index 0000000..4eebcd7 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script04.scen @@ -0,0 +1,10 @@ +echo "*** TEST 04 ***" +rtems_init +echo Create 0x0a010001 +task_create TA1 1 +task_suspend TA1 +task_create TA1 2 +task_resume TA1 +echo "*** END OF TEST 04 ***" +exit +# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script05 b/schedsim/shell/schedsim_priority/scenarios/script05 deleted file mode 100644 index c57ea4c..0000000 --- a/schedsim/shell/schedsim_priority/scenarios/script05 +++ /dev/null @@ -1,22 +0,0 @@ -echo "*** TEST 05 ***" -rtems_init -echo Create 0x0a010001 -task_create TA1 1 -task_create TA2 2 -task_create TA3 3 -semaphore_create SEM1 -semaphore_obtain SEM1 0 -semaphore_obtain SEM1 0 -semaphore_obtain SEM1 0 -semaphore_flush SEM1 -echo "*** Now back to TA1 to do it differently" -semaphore_obtain SEM1 0 -semaphore_obtain SEM1 0 -semaphore_release SEM1 -# as TA1 -semaphore_obtain SEM1 0 -semaphore_delete SEM1 -# should preempt -echo "*** END OF TEST 05 ***" -exit -# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script05.expected b/schedsim/shell/schedsim_priority/scenarios/script05.expected new file mode 100644 index 0000000..f51de95 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script05.expected @@ -0,0 +1,45 @@ +*** TEST 05 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Create 0x0a010001 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Creating task with: Preemption: yes Timeslicing: no +Task (TA2) created: id=0x0a010002, priority=2 +Task (TA2) starting: id=0x0a010002, priority=2 +Creating task with: Preemption: yes Timeslicing: no +Task (TA3) created: id=0x0a010003, priority=3 +Task (TA3) starting: id=0x0a010003, priority=3 +Semaphore (SEM1) created: id=0x1a010001 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Flushing semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +*** Now back to TA1 to do it differently +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Releasing semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Deleting semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +*** END OF TEST 05 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script05.output b/schedsim/shell/schedsim_priority/scenarios/script05.output new file mode 100644 index 0000000..f51de95 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script05.output @@ -0,0 +1,45 @@ +*** TEST 05 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Create 0x0a010001 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Creating task with: Preemption: yes Timeslicing: no +Task (TA2) created: id=0x0a010002, priority=2 +Task (TA2) starting: id=0x0a010002, priority=2 +Creating task with: Preemption: yes Timeslicing: no +Task (TA3) created: id=0x0a010003, priority=3 +Task (TA3) starting: id=0x0a010003, priority=3 +Semaphore (SEM1) created: id=0x1a010001 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Flushing semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +*** Now back to TA1 to do it differently +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Releasing semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Deleting semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +*** END OF TEST 05 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script05.scen b/schedsim/shell/schedsim_priority/scenarios/script05.scen new file mode 100644 index 0000000..c57ea4c --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script05.scen @@ -0,0 +1,22 @@ +echo "*** TEST 05 ***" +rtems_init +echo Create 0x0a010001 +task_create TA1 1 +task_create TA2 2 +task_create TA3 3 +semaphore_create SEM1 +semaphore_obtain SEM1 0 +semaphore_obtain SEM1 0 +semaphore_obtain SEM1 0 +semaphore_flush SEM1 +echo "*** Now back to TA1 to do it differently" +semaphore_obtain SEM1 0 +semaphore_obtain SEM1 0 +semaphore_release SEM1 +# as TA1 +semaphore_obtain SEM1 0 +semaphore_delete SEM1 +# should preempt +echo "*** END OF TEST 05 ***" +exit +# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script06 b/schedsim/shell/schedsim_priority/scenarios/script06 deleted file mode 100644 index 962568d..0000000 --- a/schedsim/shell/schedsim_priority/scenarios/script06 +++ /dev/null @@ -1,14 +0,0 @@ -echo "*** TEST 06 ***" -rtems_init -echo Create 0x0a010001 -task_create TA1 1 -task_create TA2 2 -task_create TA3 3 -semaphore_create SEM1 -semaphore_obtain SEM1 0 -semaphore_obtain SEM1 0 -semaphore_release SEM1 -semaphore_delete SEM1 -echo "*** END OF TEST 06 ***" -exit -# We will not get here diff --git a/schedsim/shell/schedsim_priority/scenarios/script06.expected b/schedsim/shell/schedsim_priority/scenarios/script06.expected new file mode 100644 index 0000000..5a7fbb4 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script06.expected @@ -0,0 +1,27 @@ +*** TEST 06 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Create 0x0a010001 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Creating task with: Preemption: yes Timeslicing: no +Task (TA2) created: id=0x0a010002, priority=2 +Task (TA2) starting: id=0x0a010002, priority=2 +Creating task with: Preemption: yes Timeslicing: no +Task (TA3) created: id=0x0a010003, priority=3 +Task (TA3) starting: id=0x0a010003, priority=3 +Semaphore (SEM1) created: id=0x1a010001 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Releasing semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Deleting semaphore (0x1a010001) +*** END OF TEST 06 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script06.output b/schedsim/shell/schedsim_priority/scenarios/script06.output new file mode 100644 index 0000000..5a7fbb4 --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script06.output @@ -0,0 +1,27 @@ +*** TEST 06 *** + Thread Heir: 0x09010001 priority=255 + Thread Executing: 0x09010001 priority=255 +Create 0x0a010001 +Creating task with: Preemption: yes Timeslicing: no +Task (TA1) created: id=0x0a010001, priority=1 +Task (TA1) starting: id=0x0a010001, priority=1 + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Creating task with: Preemption: yes Timeslicing: no +Task (TA2) created: id=0x0a010002, priority=2 +Task (TA2) starting: id=0x0a010002, priority=2 +Creating task with: Preemption: yes Timeslicing: no +Task (TA3) created: id=0x0a010003, priority=3 +Task (TA3) starting: id=0x0a010003, priority=3 +Semaphore (SEM1) created: id=0x1a010001 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010002 priority=2 + Thread Executing: 0x0a010002 priority=2 +Obtain semaphore (0x1a010001) with timeout 0 + Thread Heir: 0x0a010003 priority=3 + Thread Executing: 0x0a010003 priority=3 +Releasing semaphore (0x1a010001) + Thread Heir: 0x0a010001 priority=1 + Thread Executing: 0x0a010001 priority=1 +Deleting semaphore (0x1a010001) +*** END OF TEST 06 *** diff --git a/schedsim/shell/schedsim_priority/scenarios/script06.scen b/schedsim/shell/schedsim_priority/scenarios/script06.scen new file mode 100644 index 0000000..962568d --- /dev/null +++ b/schedsim/shell/schedsim_priority/scenarios/script06.scen @@ -0,0 +1,14 @@ +echo "*** TEST 06 ***" +rtems_init +echo Create 0x0a010001 +task_create TA1 1 +task_create TA2 2 +task_create TA3 3 +semaphore_create SEM1 +semaphore_obtain SEM1 0 +semaphore_obtain SEM1 0 +semaphore_release SEM1 +semaphore_delete SEM1 +echo "*** END OF TEST 06 ***" +exit +# We will not get here -- cgit v1.2.3