summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpscheduler03
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-30 14:08:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-07-01 11:51:49 +0200
commitc0bd0064ac41f0602c0abfe494dbe140d7c5282f (patch)
treeaaa200033234cf2d3833305f13565171521b0d26 /testsuites/smptests/smpscheduler03
parentscore: Workaround for #2751 (diff)
downloadrtems-c0bd0064ac41f0602c0abfe494dbe140d7c5282f.tar.bz2
rtems: Fix rtems_task_set_scheduler() API
Task priorities are only valid within a scheduler instance. The rtems_task_set_scheduler() directive moves a task from one scheduler instance to another using the current priority of the thread. However, the current task priority of the source scheduler instance is undefined in the target scheduler instance. Add a third parameter to specify the priority. Close #2749.
Diffstat (limited to 'testsuites/smptests/smpscheduler03')
-rw-r--r--testsuites/smptests/smpscheduler03/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuites/smptests/smpscheduler03/init.c b/testsuites/smptests/smpscheduler03/init.c
index f610b62532..b7a76a994c 100644
--- a/testsuites/smptests/smpscheduler03/init.c
+++ b/testsuites/smptests/smpscheduler03/init.c
@@ -603,7 +603,7 @@ static void Init(rtems_task_argument arg)
sc = rtems_task_create(
rtems_build_name('T', 'A', 'S', 'K'),
- 1,
+ 255,
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES,
@@ -614,7 +614,7 @@ static void Init(rtems_task_argument arg)
sc = rtems_scheduler_ident(SCHED_NAME(cpu_index), &scheduler_id);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
- sc = rtems_task_set_scheduler(ctx->task_id[cpu_index], scheduler_id);
+ sc = rtems_task_set_scheduler(ctx->task_id[cpu_index], scheduler_id, 1);
rtems_test_assert(sc == RTEMS_SUCCESSFUL);
sc = rtems_task_start(ctx->task_id[cpu_index], test_task, cpu_index);