mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-28 15:53:06 +08:00
score: Fix EDF SMP scheduler
Fix a special case: block a one-to-one scheduled thread while having a non-empty affine ready queue on the same processor.
This commit is contained in:
@@ -156,6 +156,30 @@ static const test_action test_actions[] = {
|
||||
UNBLOCK( 0, 0, IDLE),
|
||||
SET_AFFINITY( 1, A(1, 0), 0, IDLE),
|
||||
UNBLOCK( 1, 1, 0),
|
||||
/*
|
||||
* Block a one-to-one thread while having a non-empty affine ready queue on
|
||||
* the same processor.
|
||||
*/
|
||||
RESET,
|
||||
SET_AFFINITY( 1, A(1, 0), IDLE, IDLE),
|
||||
SET_AFFINITY( 3, A(1, 0), IDLE, IDLE),
|
||||
UNBLOCK( 0, 0, IDLE),
|
||||
UNBLOCK( 1, 1, 0),
|
||||
UNBLOCK( 2, 1, 0),
|
||||
UNBLOCK( 3, 1, 0),
|
||||
BLOCK( 1, 2, 0),
|
||||
BLOCK( 0, 3, 2),
|
||||
/*
|
||||
* Make sure that a one-to-one thread does not get the wrong processor
|
||||
* allocated after selecting the highest ready thread.
|
||||
*/
|
||||
RESET,
|
||||
SET_AFFINITY( 1, A(1, 0), IDLE, IDLE),
|
||||
SET_AFFINITY( 2, A(1, 0), IDLE, IDLE),
|
||||
UNBLOCK( 0, 0, IDLE),
|
||||
UNBLOCK( 1, 1, 0),
|
||||
UNBLOCK( 2, 1, 0),
|
||||
BLOCK( 0, 1, IDLE),
|
||||
RESET
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user