Script File : cpus4_inherit_priority.scen verbose : 1 ==> 1: # ==> 2: # Verify we select the oldest task at a priority ==> 3: # ==> 4: rtems_init 4 CPU 0: Thread Heir: 0x09010001 priority=255 CPU 0: Thread Executing: 0x09010001 priority=255 CPU 1: Thread Heir: 0x09010002 priority=255 CPU 1: Thread Executing: 0x09010002 priority=255 CPU 2: Thread Heir: 0x09010003 priority=255 CPU 2: Thread Executing: 0x09010003 priority=255 CPU 3: Thread Heir: 0x09010004 priority=255 CPU 3: Thread Executing: 0x09010004 priority=255 ==> 5: task_create smp1 8 Creating task with: Preemption: yes Timeslicing: no Task (smp1) created: id=0x0a010001, priority=8 Task (smp1) starting: id=0x0a010001, priority=8 CPU 3: Thread Heir: 0x0a010001 priority=8 CPU 3: Thread Executing: 0x0a010001 priority=8 ==> 6: task_create smp2 8 Creating task with: Preemption: yes Timeslicing: no Task (smp2) created: id=0x0a010002, priority=8 Task (smp2) starting: id=0x0a010002, priority=8 CPU 2: Thread Heir: 0x0a010002 priority=8 CPU 2: Thread Executing: 0x0a010002 priority=8 ==> 7: task_create smp3 8 Creating task with: Preemption: yes Timeslicing: no Task (smp3) created: id=0x0a010003, priority=8 Task (smp3) starting: id=0x0a010003, priority=8 CPU 1: Thread Heir: 0x0a010003 priority=8 CPU 1: Thread Executing: 0x0a010003 priority=8 ==> 8: task_create smp4 8 Creating task with: Preemption: yes Timeslicing: no Task (smp4) created: id=0x0a010004, priority=8 Task (smp4) starting: id=0x0a010004, priority=8 CPU 0: Thread Heir: 0x0a010004 priority=8 CPU 0: Thread Executing: 0x0a010004 priority=8 ==> 9: # GOAL: Tasks 0x0a010001 - 0x0a010004 as heir and executing ==> 10: # GOAL: on CPUs 3 - 0 respectively ==> 11: cpus smp4 smp3 smp2 smp1 === CPU Status EXECUTING / HEIR / SWITCH NEEDED CPU 0: 0x0a010004 @ 8 / 0x0a010004 @ 8 false CPU 1: 0x0a010003 @ 8 / 0x0a010003 @ 8 false CPU 2: 0x0a010002 @ 8 / 0x0a010002 @ 8 false CPU 3: 0x0a010001 @ 8 / 0x0a010001 @ 8 false === End of Ready Set of Threads ==> 12: ==> 13: # sem1 is binary semaphore (e.g. mutex) with priority ceiling of 5 ==> 14: semaphore_create -b -p -C 5 -V 1 sem1 Semaphore (sem1) created: id=0x1a010001 ==> 15: cpus smp4 smp3 smp2 smp1 === CPU Status EXECUTING / HEIR / SWITCH NEEDED CPU 0: 0x0a010004 @ 8 / 0x0a010004 @ 8 false CPU 1: 0x0a010003 @ 8 / 0x0a010003 @ 8 false CPU 2: 0x0a010002 @ 8 / 0x0a010002 @ 8 false CPU 3: 0x0a010001 @ 8 / 0x0a010001 @ 8 false === End of Ready Set of Threads ==> 16: ==> 17: semaphore_obtain sem1 0 Obtain semaphore (0x1a010001) with timeout 0 ==> 18: ==> 19: # This should show smp4 has inherited a priority of 5 ==> 20: cpus smp4 smp3 smp2 smp1 === CPU Status EXECUTING / HEIR / SWITCH NEEDED CPU 0: 0x0a010004 @ 5 / 0x0a010004 @ 5 false CPU 1: 0x0a010003 @ 8 / 0x0a010003 @ 8 false CPU 2: 0x0a010002 @ 8 / 0x0a010002 @ 8 false CPU 3: 0x0a010001 @ 8 / 0x0a010001 @ 8 false === End of Ready Set of Threads ==> 21: ==> 22: semaphore_release sem1 Releasing semaphore (0x1a010001) ==> 23: # This should show smp1 has its original priority of 8 ==> 24: cpus smp4 smp3 smp2 smp1 === CPU Status EXECUTING / HEIR / SWITCH NEEDED CPU 0: 0x0a010004 @ 8 / 0x0a010004 @ 8 false CPU 1: 0x0a010003 @ 8 / 0x0a010003 @ 8 false CPU 2: 0x0a010002 @ 8 / 0x0a010002 @ 8 false CPU 3: 0x0a010001 @ 8 / 0x0a010001 @ 8 false === End of Ready Set of Threads