summaryrefslogtreecommitdiffstats
path: root/schedsim/shell/schedsim_smpsimple/scenarios/cpus4_mode_case2.scen
blob: 44263e4a6e4f6ad99d11c1d81c80e5202731f214 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
#  Show how having a non-preemptive task can create a
#  priority inversion
#
rtems_init 4
task_create -p smp1 4
task_create -p smp2 5
task_create -p smp3 4
task_create -p smp4 4
dispatch
# GOAL: 0x0a010001 - 0x0a010004 are heir and executing
# GOAL:   on CPUs 0 - 3 respectively
cpus

task_create smp5 3
dispatch
# GOAL: 0x0a010001 - 0x0a010004 are executing on CPUs 0 - 3.
# GOAL:   All are also heir EXCEPT 0x0a010005 is heir on CPU 1.
# GOAL: **** SHOWS INVERSION - CPU 1 has NO PREEMPT TASK ****
cpus

current_cpu 1
task_mode -P
dispatch
# GOAL: 0x0a010001, 0x0a010005, 0x0a010003, and 0x0a010004 are
# GOAL:   heir and executing on CPUs 0 - 3
cpus