# # 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