summaryrefslogtreecommitdiff
path: root/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_exercise_affinity_api.scen
blob: 809be8012023b69a8457a2f6c633148f683a04a4 (plain)
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
#
#  Verify that affinity APIs work with the right values
#
#  This scenario does **NOT** change the affinity of any thread
#  which ever executes.
#
rtems_init 4
task_create smp1 3
task_create smp2 6
task_create smp3 7
task_create smp4 8
task_create smp5 10
dispatch
# GOAL: Tasks 0x0a010001 - 0x0a010004 as heir and executing
# GOAL:    on CPUs 1 - 4 respectively
cpus

# GOAL: These should work OK and change the affinity
task_get_affinity smp5
task_set_affinity smp5 0x01
task_get_affinity smp5
task_set_affinity smp5 0x02
task_get_affinity smp5
task_set_affinity smp5 0x04
task_get_affinity smp5
task_set_affinity smp5 0x08
task_get_affinity smp5

# GOAL This should fail.
task_set_affinity smp5 0x10
task_get_affinity smp5