[Xenomai-git] Jan Kiszka : switchtest: Bail out early from rtswitch_ktask on termination
Module: xenomai-jki Branch: for-forge Commit: 7c3dfd6fd7d8f605c40713429a88b2abf08a02dc URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=7c3dfd6fd7d8f605c40713429a88b2abf08a02dc Author: Jan Kiszka Date: Mon Nov 18 19:08:11 2013 +0100 switchtest: Bail out early from rtswitch_ktask on termination rtswitch_pend_rt may have been interrupted if the task is supposed to stop. Reorder the test for this in order to avoid starting to run on invalid data. Signed-off-by: Jan Kiszka --- kernel/drivers/testing/switchtest.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/drivers/testing/switchtest.c b/kernel/drivers/testing/switchtest.c index b7b6a21..354dece 100644 --- a/kernel/drivers/testing/switchtest.c +++ b/kernel/drivers/testing/switchtest.c @@ -400,7 +400,7 @@ static void rtswitch_ktask(void *cookie) rtswitch_pend_rt(ctx, task->base.index); - for(;;) { + while (!rtdm_task_should_stop()) { if (task->base.flags & RTTST_SWTEST_USE_FPU) fp_regs_set(fp_features, task->base.index + i * 1000); @@ -433,9 +433,6 @@ static void rtswitch_ktask(void *cookie) } } - if (rtdm_task_should_stop()) - break; - if (++i == 400) i = 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : switchtest: Bail out early from rtswitch_ktask on termination
Module: xenomai-jki Branch: for-forge Commit: f09ad577f233ea03558053643fd260ffcfc0aaee URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=f09ad577f233ea03558053643fd260ffcfc0aaee Author: Jan Kiszka Date: Mon Nov 18 19:08:11 2013 +0100 switchtest: Bail out early from rtswitch_ktask on termination rtswitch_pend_rt may have been interrupted if the task is supposed to stop. Reorder the test for this in order to avoid starting to run on invalid data. Signed-off-by: Jan Kiszka --- kernel/drivers/testing/switchtest.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/drivers/testing/switchtest.c b/kernel/drivers/testing/switchtest.c index 6f77ee9..8850962 100644 --- a/kernel/drivers/testing/switchtest.c +++ b/kernel/drivers/testing/switchtest.c @@ -400,7 +400,7 @@ static void rtswitch_ktask(void *cookie) rtswitch_pend_rt(ctx, task->base.index); - for(;;) { + while (!rtdm_task_should_stop()) { if (task->base.flags & RTTST_SWTEST_USE_FPU) fp_regs_set(fp_features, task->base.index + i * 1000); @@ -433,9 +433,6 @@ static void rtswitch_ktask(void *cookie) } } - if (rtdm_task_should_stop()) - break; - if (++i == 400) i = 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Jan Kiszka : switchtest: Bail out early from rtswitch_ktask on termination
Module: xenomai-jki Branch: for-upstream Commit: a9b06c6aab1d599a08c0a41b3963d062b7836f25 URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=a9b06c6aab1d599a08c0a41b3963d062b7836f25 Author: Jan Kiszka Date: Mon Nov 18 19:08:11 2013 +0100 switchtest: Bail out early from rtswitch_ktask on termination rtswitch_pend_rt may have been interrupted if the task is supposed to stop. Reorder the test for this in order to avoid starting to run on invalid data. Signed-off-by: Jan Kiszka --- kernel/drivers/testing/switchtest.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/drivers/testing/switchtest.c b/kernel/drivers/testing/switchtest.c index 6f77ee9..8850962 100644 --- a/kernel/drivers/testing/switchtest.c +++ b/kernel/drivers/testing/switchtest.c @@ -400,7 +400,7 @@ static void rtswitch_ktask(void *cookie) rtswitch_pend_rt(ctx, task->base.index); - for(;;) { + while (!rtdm_task_should_stop()) { if (task->base.flags & RTTST_SWTEST_USE_FPU) fp_regs_set(fp_features, task->base.index + i * 1000); @@ -433,9 +433,6 @@ static void rtswitch_ktask(void *cookie) } } - if (rtdm_task_should_stop()) - break; - if (++i == 400) i = 0; } ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git