diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-07-10 14:27:42 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-07-10 15:29:57 +0200 |
commit | 27783f6ca8683eaf4826e777963c32a63f55da31 (patch) | |
tree | 45a3294eb7cfd6bae51e1cb1661f699b0e23d6e8 /testsuites/smptests/smpmrsp01/init.c | |
parent | score: Fix assertions (diff) | |
download | rtems-27783f6ca8683eaf4826e777963c32a63f55da31.tar.bz2 |
score: Fix scheduler helping implementation
Do not extract the idle threads from the ready set so that there is
always a thread available for comparison.
Diffstat (limited to 'testsuites/smptests/smpmrsp01/init.c')
-rw-r--r-- | testsuites/smptests/smpmrsp01/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/smptests/smpmrsp01/init.c b/testsuites/smptests/smpmrsp01/init.c index ce22c25d17..bfa5d982df 100644 --- a/testsuites/smptests/smpmrsp01/init.c +++ b/testsuites/smptests/smpmrsp01/init.c @@ -900,9 +900,23 @@ static void test_mrsp_obtain_and_release_with_help(test_context *ctx) rtems_test_assert(rtems_get_current_processor() == 1); + /* + * With this operation the scheduler instance 0 has now only the main and the + * idle threads in the ready set. + */ + sc = rtems_task_suspend(run_task_id); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + rtems_test_assert(rtems_get_current_processor() == 1); + + change_prio(RTEMS_SELF, 1); + change_prio(RTEMS_SELF, 3); + sc = rtems_semaphore_release(ctx->mrsp_ids[0]); rtems_test_assert(sc == RTEMS_SUCCESSFUL); + rtems_test_assert(rtems_get_current_processor() == 0); + assert_prio(RTEMS_SELF, 3); wait_for_prio(help_task_id, 3); |