diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-09-03 08:12:35 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-09-03 09:37:35 +0200 |
commit | e0a9336bf939e7bc4b0adb9227e2d2198de8dc7f (patch) | |
tree | c569bccfc3433ac758114a7daf4015b93ae74512 /testsuites/smptests/smpschededf02/init.c | |
parent | score: Generalize SMP scheduler block support (diff) | |
download | rtems-e0a9336bf939e7bc4b0adb9227e2d2198de8dc7f.tar.bz2 |
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.
Diffstat (limited to 'testsuites/smptests/smpschededf02/init.c')
-rw-r--r-- | testsuites/smptests/smpschededf02/init.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuites/smptests/smpschededf02/init.c b/testsuites/smptests/smpschededf02/init.c index e9a521caf5..c045a860e7 100644 --- a/testsuites/smptests/smpschededf02/init.c +++ b/testsuites/smptests/smpschededf02/init.c @@ -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 }; |