From f9219db2a95c8285d1be22092572b4236bfe6488 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 5 Apr 2019 08:16:05 +0200 Subject: rtems: Add rtems_scheduler_get_processor_maximum() Add rtems_scheduler_get_processor_maximum() as a replacement for rtems_get_processor_count(). The rtems_get_processor_count() is a bit orphaned. Adopt it by the Scheduler Manager. The count is also misleading, since the processor set may have gaps and the actual count of online processors may be less than the value returned by rtems_get_processor_count(). Update #3732. --- testsuites/smptests/smpmrsp01/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testsuites/smptests/smpmrsp01') diff --git a/testsuites/smptests/smpmrsp01/init.c b/testsuites/smptests/smpmrsp01/init.c index a3e955b30c..6f00f688e4 100644 --- a/testsuites/smptests/smpmrsp01/init.c +++ b/testsuites/smptests/smpmrsp01/init.c @@ -250,7 +250,7 @@ static void create_mrsp_sema( rtems_task_priority prio ) { - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t index; rtems_status_code sc; @@ -1547,7 +1547,7 @@ static void migration_task(rtems_task_argument arg) { test_context *ctx = &test_instance; rtems_status_code sc; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t v = 0xdeadbeef; while (true) { @@ -1565,7 +1565,7 @@ static void migration_task(rtems_task_argument arg) static void test_mrsp_load(test_context *ctx) { rtems_status_code sc; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t index; puts("test MrsP load"); @@ -1727,7 +1727,7 @@ static void Init(rtems_task_argument arg) test_context *ctx = &test_instance; rtems_status_code sc; rtems_resource_snapshot snapshot; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t cpu_index; TEST_BEGIN(); -- cgit v1.2.3