summaryrefslogtreecommitdiffstats
path: root/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_overlap_case1.scen
blob: d6f05051afc10df4638f695ca313a8d08bfbdcff (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# Create 2 sets of threads one that can run on cpus
# {0,1} the others can run on cpus {1,2,3}.  Then
# swap the affinity of the two sets
#
rtems_init 4
task_create smp1 4 -a 0x0e
task_create smp2 4 -a 0x0e
task_create smp3 4 -a 0x03
task_create smp4 4 -a 0x03

# EXECUTING: {smp1 smp2 smp3 smp4}
# READY:     {IDLE IDLE IDLE IDLE}
# GOAL: want 0x0a010004 - 0x0a010001 as heir and executings
# GOAL:   on CPUs 0 -3 respectively
cpus smp4 smp3 smp2 smp1

task_set_affinity smp1 0x03
# EXECUTING: {smp2 smp3 smp4 IDLE}
# READY:     {smp1 IDLE IDLE IDLE}
# GOAL: want 0x0a010004, 0x0a010003, 0x0a010002,0x09010001
# GOAL:   as heir and executings on CPUs 0-3 respectively
cpus smp4 smp3 smp2 IDLE

task_set_affinity smp2 0x03
# EXECUTING: {smp3 smp4 IDLE IDLE}
# READY:     {smp1 smp2 IDLE IDLE}
# GOAL: want 0x0a010004, 0x0a010003, 0x00910002,0x09010001
# GOAL:   as heir and executings on CPUs 0-3 respectively
cpus smp4 smp3 IDLE IDLE

task_set_affinity smp3 0x0e
# EXECUTING: {smp4 smp2 smp3 IDLE}
# READY:     {smp1 smp2 IDLE IDLE}
# GOAL: want 0x0a010004, 0x0a010002, 0x0a010003,0x09010001
# GOAL:   as heir and executings on CPUs 0-3 respectively
cpus smp4 smp2 smp3 IDLE

task_set_affinity smp4 0x0e
# EXECUTING: {smp4 smp2 smp3 smp1}
# READY:     {IDLE IDLE IDLE IDLE}
# GOAL: want 0x0a010001, 0x0a010002, 0x0a010003,0x0a010004
# GOAL:   as heir and executings on CPUs 0-3 respectively
cpus smp1 smp2 smp3 smp4