[rtems commit] smptests/smpmrsp01: Fix scheduler ids

Sebastian Huber sebh at rtems.org
Tue Jun 3 07:02:46 UTC 2014


Module:    rtems
Branch:    master
Commit:    1ee0d5f71951904d660d116ae3d346f588dcf937
Changeset: http://git.rtems.org/rtems/commit/?id=1ee0d5f71951904d660d116ae3d346f588dcf937

Author:    Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date:      Mon Jun  2 16:15:14 2014 +0200

smptests/smpmrsp01: Fix scheduler ids

---

 testsuites/smptests/smpmrsp01/init.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/testsuites/smptests/smpmrsp01/init.c b/testsuites/smptests/smpmrsp01/init.c
index b5590ed..b93f196 100644
--- a/testsuites/smptests/smpmrsp01/init.c
+++ b/testsuites/smptests/smpmrsp01/init.c
@@ -866,11 +866,19 @@ static void Init(rtems_task_argument arg)
 
   ctx->main_task_id = rtems_task_self();
 
-  for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) {
+  for (cpu_index = 0; cpu_index < 2; ++cpu_index) {
     sc = rtems_scheduler_ident(cpu_index, &ctx->scheduler_ids[cpu_index]);
     rtems_test_assert(sc == RTEMS_SUCCESSFUL);
   }
 
+  for (cpu_index = 2; cpu_index < cpu_count; ++cpu_index) {
+    sc = rtems_scheduler_ident(
+      cpu_index / 2 + 1,
+      &ctx->scheduler_ids[cpu_index]
+    );
+    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+  }
+
   test_mrsp_flush_error();
   test_mrsp_initially_locked_error();
   test_mrsp_nested_obtain_error();




More information about the vc mailing list