diff options
Diffstat (limited to 'schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_block_case1.scn')
-rw-r--r-- | schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_block_case1.scn | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_block_case1.scn b/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_block_case1.scn new file mode 100644 index 0000000..694da1d --- /dev/null +++ b/schedsim/shell/schedsim_smppriority_affinity/scenarios/cpus4_affinity_block_case1.scn @@ -0,0 +1,29 @@ +# +# Block a thread in an application with thread affinity and +# priorities such that finding an heir requires scanning the +# ready set of threads. +# +# Basic premise: +# - Two threads at low priority, affinity for core 0 +# - More threads than core at high priority, affinity for all but core 0 +# +rtems_init 4 +task_create smp1 -a 0xe 10 +task_create smp2 -a 0xe 10 +task_create smp3 -a 0xe 10 +task_create smp4 -a 0xe 10 +# GOAL: Core 0 should be idle +# GOAL: Cores 1-3 should be 0x0a01000[321] respectively +cpus IDLE smp3 smp2 smp1 + +# check_tasks IDLE smp3 smp2 smp1 +# GOAL: Core 0 should have aff1 0x0a010005 +# GOAL: Cores 1-3 should be 0x0a01000[321] respectively +task_create aff1 -a 0x1 11 +cpus aff1 smp3 smp2 smp1 + +# Create a low priority task with affinity to core 0 +task_create aff2 -a 0x1 11 +cpus aff1 smp3 smp2 smp1 +task_suspend aff1 +cpus aff2 smp3 smp2 smp1 |