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/smp01/init.c | 6 +++--- testsuites/smptests/smp02/init.c | 4 ++-- testsuites/smptests/smp03/init.c | 12 +++++++----- testsuites/smptests/smp05/init.c | 4 ++-- testsuites/smptests/smp07/init.c | 2 +- testsuites/smptests/smp08/init.c | 2 +- testsuites/smptests/smp09/init.c | 2 +- testsuites/smptests/smpaffinity01/init.c | 2 +- testsuites/smptests/smpcache01/init.c | 17 +++++++++++------ testsuites/smptests/smpcapture01/init.c | 2 +- testsuites/smptests/smpcapture02/init.c | 2 +- testsuites/smptests/smpclock01/init.c | 2 +- testsuites/smptests/smpfatal01/init.c | 8 ++++++-- testsuites/smptests/smpfatal02/init.c | 8 ++++++-- testsuites/smptests/smpipi01/init.c | 4 ++-- testsuites/smptests/smpload01/init.c | 6 +++--- testsuites/smptests/smpmigration01/init.c | 2 +- testsuites/smptests/smpmigration02/init.c | 8 ++++---- testsuites/smptests/smpmrsp01/init.c | 8 ++++---- testsuites/smptests/smpmutex01/init.c | 4 ++-- testsuites/smptests/smpmutex02/init.c | 2 +- testsuites/smptests/smpopenmp01/init.c | 2 +- testsuites/smptests/smppsxaffinity01/init.c | 2 +- testsuites/smptests/smppsxaffinity02/init.c | 2 +- testsuites/smptests/smppsxmutex01/init.c | 2 +- testsuites/smptests/smppsxsignal01/init.c | 2 +- testsuites/smptests/smpschedaffinity01/init.c | 2 +- testsuites/smptests/smpschedaffinity02/init.c | 2 +- testsuites/smptests/smpschedaffinity03/init.c | 2 +- testsuites/smptests/smpschedaffinity04/init.c | 2 +- testsuites/smptests/smpschedaffinity05/init.c | 2 +- testsuites/smptests/smpschededf02/init.c | 2 +- testsuites/smptests/smpschededf03/init.c | 2 +- testsuites/smptests/smpschededf04/init.c | 2 +- testsuites/smptests/smpscheduler01/init.c | 2 +- testsuites/smptests/smpscheduler02/init.c | 4 ++-- testsuites/smptests/smpscheduler04/init.c | 6 +++--- testsuites/smptests/smpsignal01/init.c | 2 +- testsuites/smptests/smpstrongapa01/init.c | 2 +- testsuites/smptests/smpswitchextension01/init.c | 2 +- testsuites/smptests/smpthreadlife01/init.c | 2 +- testsuites/smptests/smpthreadpin01/init.c | 2 +- testsuites/smptests/smpwakeafter01/init.c | 2 +- 43 files changed, 86 insertions(+), 71 deletions(-) (limited to 'testsuites/smptests') diff --git a/testsuites/smptests/smp01/init.c b/testsuites/smptests/smp01/init.c index cf7d5ab9c1..cbfd205010 100644 --- a/testsuites/smptests/smp01/init.c +++ b/testsuites/smptests/smp01/init.c @@ -48,12 +48,12 @@ rtems_task Init( locked_print_initialize(); /* Initialize the TaskRan array */ - for ( i=0; imain_barrier_state; @@ -131,7 +131,7 @@ static void test_send_message_flood( test_context *ctx ) { - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t cpu_index_self = rtems_scheduler_get_processor(); uint32_t cpu_index; diff --git a/testsuites/smptests/smpload01/init.c b/testsuites/smptests/smpload01/init.c index da4c91d875..cc08220b60 100644 --- a/testsuites/smptests/smpload01/init.c +++ b/testsuites/smptests/smpload01/init.c @@ -80,7 +80,7 @@ static void inherit_obtain_task(rtems_task_argument arg) test_context *ctx = &test_instance; rtems_status_code sc; SMP_barrier_State barrier_state = SMP_BARRIER_STATE_INITIALIZER; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); rtems_counter_ticks delay = (cpu_count - 1 - arg) * ctx->inherit_obtain_delay; while (true) { @@ -333,7 +333,7 @@ static void test(void) sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT); rtems_test_assert(sc == RTEMS_SUCCESSFUL); - for (i = 0; i < rtems_get_processor_count(); ++i) { + for (i = 0; i < rtems_scheduler_get_processor_maximum(); ++i) { sc = rtems_task_create( rtems_build_name('I', 'N', 'H', 'O'), INHERIT_OBTAIN_PRIO_BASE + i, @@ -368,7 +368,7 @@ static void test(void) ctx->inherit_release_counter ); - for (i = 0; i < rtems_get_processor_count(); ++i) { + for (i = 0; i < rtems_scheduler_get_processor_maximum(); ++i) { printf( "priority inheritance obtain count %2" PRIu32 ": %" PRIu64 "\n", i, diff --git a/testsuites/smptests/smpmigration01/init.c b/testsuites/smptests/smpmigration01/init.c index 476a12a0cd..6ee263f35c 100644 --- a/testsuites/smptests/smpmigration01/init.c +++ b/testsuites/smptests/smpmigration01/init.c @@ -227,7 +227,7 @@ static void Init(rtems_task_argument arg) rtems_print_printer_fprintf_putc(&rtems_test_printer); TEST_BEGIN(); - if (rtems_get_processor_count() >= 2) { + if (rtems_scheduler_get_processor_maximum() >= 2) { test(); } diff --git a/testsuites/smptests/smpmigration02/init.c b/testsuites/smptests/smpmigration02/init.c index e613f5dae9..383dc17eb5 100644 --- a/testsuites/smptests/smpmigration02/init.c +++ b/testsuites/smptests/smpmigration02/init.c @@ -56,7 +56,7 @@ static void migration_task(rtems_task_argument arg) test_context *ctx = &test_instance; uint32_t task_index = arg; rtems_task_priority prio = migration_task_prio(task_index); - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t cpu_index = rtems_scheduler_get_processor(); while (true) { @@ -80,7 +80,7 @@ static void migration_task(rtems_task_argument arg) static void test_migrations(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 task_count = cpu_count + 1; uint32_t task_index; @@ -146,7 +146,7 @@ static Thread_Control *get_thread_by_id(rtems_id task_id) static void test_double_migration(test_context *ctx) { - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); if (cpu_count >= 2) { rtems_status_code sc; @@ -250,7 +250,7 @@ static void test_double_migration(test_context *ctx) static void init_scheduler_ids(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 cpu_index; for (cpu_index = 0; cpu_index < cpu_count; ++cpu_index) { 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(); diff --git a/testsuites/smptests/smpmutex01/init.c b/testsuites/smptests/smpmutex01/init.c index fa449aacf2..eb90ad72e2 100644 --- a/testsuites/smptests/smpmutex01/init.c +++ b/testsuites/smptests/smpmutex01/init.c @@ -516,7 +516,7 @@ static void test_init(test_context *ctx) start_task(ctx, A_2_1, worker, 2, SCHED_A); start_task(ctx, H_A, helper, 3, SCHED_A); - if (rtems_get_processor_count() >= PART_COUNT) { + if (rtems_scheduler_get_processor_maximum() >= PART_COUNT) { start_task(ctx, B_4, worker, 4, SCHED_B); start_task(ctx, B_5_0, worker, 5, SCHED_B); start_task(ctx, B_5_1, worker, 5, SCHED_B); @@ -1065,7 +1065,7 @@ static void test(test_context *ctx) { test_init(ctx); - if (rtems_get_processor_count() >= PART_COUNT) { + if (rtems_scheduler_get_processor_maximum() >= PART_COUNT) { test_task_get_priority_not_defined(ctx); test_simple_inheritance(ctx); test_dequeue_order_one_scheduler_instance(ctx); diff --git a/testsuites/smptests/smpmutex02/init.c b/testsuites/smptests/smpmutex02/init.c index 9591b46217..c0b8e44dc6 100644 --- a/testsuites/smptests/smpmutex02/init.c +++ b/testsuites/smptests/smpmutex02/init.c @@ -171,7 +171,7 @@ static void set_up(test_context *ctx) rtems_status_code sc; uint32_t i; - ctx->cpu_count = rtems_get_processor_count(); + ctx->cpu_count = rtems_scheduler_get_processor_maximum(); ctx->mtx_count = MTX_PER_CPU * ctx->cpu_count; sc = rtems_semaphore_create( diff --git a/testsuites/smptests/smpopenmp01/init.c b/testsuites/smptests/smpopenmp01/init.c index 5d4ab1243d..802f5bb05c 100644 --- a/testsuites/smptests/smpopenmp01/init.c +++ b/testsuites/smptests/smpopenmp01/init.c @@ -239,7 +239,7 @@ static uint32_t find_free_cpu(test_context *ctx) uint32_t i; uint32_t n; - n = rtems_get_processor_count(); + n = rtems_scheduler_get_processor_maximum(); pthread_mutex_lock(&ctx->mtx); diff --git a/testsuites/smptests/smppsxaffinity01/init.c b/testsuites/smptests/smppsxaffinity01/init.c index 56a0078b77..336fbeba48 100644 --- a/testsuites/smptests/smppsxaffinity01/init.c +++ b/testsuites/smptests/smppsxaffinity01/init.c @@ -111,7 +111,7 @@ void Validate_attr(void ) rtems_test_assert( priority != -1 ); - cpus = rtems_get_processor_count(); + cpus = rtems_scheduler_get_processor_maximum(); puts( "Init - Validate pthread_attr_setaffinity_np and " "pthread_attr_getaffinity_np" diff --git a/testsuites/smptests/smppsxaffinity02/init.c b/testsuites/smptests/smppsxaffinity02/init.c index d196621950..e4d002f21e 100644 --- a/testsuites/smptests/smppsxaffinity02/init.c +++ b/testsuites/smptests/smppsxaffinity02/init.c @@ -125,7 +125,7 @@ void Validate_affinity(void ) rtems_test_assert( !sc ); /* Get the number of processors that we are using. */ - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); /* Fill the remaining cpus with med priority tasks */ puts( "Init - Create Medium priority tasks"); diff --git a/testsuites/smptests/smppsxmutex01/init.c b/testsuites/smptests/smppsxmutex01/init.c index a634c76962..04bed7b4f2 100644 --- a/testsuites/smptests/smppsxmutex01/init.c +++ b/testsuites/smptests/smppsxmutex01/init.c @@ -95,7 +95,7 @@ static void test(test_context *ctx) int prio_ceiling; int eno; - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); rtems_test_assert(rtems_scheduler_get_processor() == 0); diff --git a/testsuites/smptests/smppsxsignal01/init.c b/testsuites/smptests/smppsxsignal01/init.c index 53ecb54932..529e870f0a 100644 --- a/testsuites/smptests/smppsxsignal01/init.c +++ b/testsuites/smptests/smppsxsignal01/init.c @@ -165,7 +165,7 @@ static void *POSIX_Init(void *arg) { TEST_BEGIN(); - if (rtems_get_processor_count() >= 2) { + if (rtems_scheduler_get_processor_maximum() >= 2) { test(); } diff --git a/testsuites/smptests/smpschedaffinity01/init.c b/testsuites/smptests/smpschedaffinity01/init.c index c5a9ed5098..6134eaf86d 100644 --- a/testsuites/smptests/smpschedaffinity01/init.c +++ b/testsuites/smptests/smpschedaffinity01/init.c @@ -84,7 +84,7 @@ static void test(void) uint32_t cpu_count; /* Get the number of processors that we are using. */ - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); size = sizeof(cpu_set_t); diff --git a/testsuites/smptests/smpschedaffinity02/init.c b/testsuites/smptests/smpschedaffinity02/init.c index d8d2c23172..0ebdd14efa 100644 --- a/testsuites/smptests/smpschedaffinity02/init.c +++ b/testsuites/smptests/smpschedaffinity02/init.c @@ -128,7 +128,7 @@ static void test(void) cpu_set_t cpuset; /* Get the number of processors that we are using. */ - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); if (cpu_count < NUM_CPUS) { printf("Error: Test requires at least 2 cpus\n"); return; diff --git a/testsuites/smptests/smpschedaffinity03/init.c b/testsuites/smptests/smpschedaffinity03/init.c index 5f63d5ff80..6b3fb5923d 100644 --- a/testsuites/smptests/smpschedaffinity03/init.c +++ b/testsuites/smptests/smpschedaffinity03/init.c @@ -43,7 +43,7 @@ static void test(void) cpu_set_t cpuset; /* Get the number of processors that we are using. */ - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); id = rtems_task_self(); diff --git a/testsuites/smptests/smpschedaffinity04/init.c b/testsuites/smptests/smpschedaffinity04/init.c index 329b5a78c4..64250b9d63 100644 --- a/testsuites/smptests/smpschedaffinity04/init.c +++ b/testsuites/smptests/smpschedaffinity04/init.c @@ -75,7 +75,7 @@ static void test(void) cpu_set_t cpuset; /* Get the number of processors that we are using. */ - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); if (cpu_count < 2) { printf("Error: Test requires at least 2 cpus\n"); return; diff --git a/testsuites/smptests/smpschedaffinity05/init.c b/testsuites/smptests/smpschedaffinity05/init.c index 822bdddae6..f1249883d6 100644 --- a/testsuites/smptests/smpschedaffinity05/init.c +++ b/testsuites/smptests/smpschedaffinity05/init.c @@ -133,7 +133,7 @@ static void test(void) rtems_task_priority priority; /* Get the number of processors that we are using. */ - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); if (cpu_count != 4) { printf("Test requires a minimum of 4 cores\n"); return; diff --git a/testsuites/smptests/smpschededf02/init.c b/testsuites/smptests/smpschededf02/init.c index c045a860e7..1d29e82b72 100644 --- a/testsuites/smptests/smpschededf02/init.c +++ b/testsuites/smptests/smpschededf02/init.c @@ -381,7 +381,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_get_processor_count() == CPU_COUNT) { + if (rtems_scheduler_get_processor_maximum() == CPU_COUNT) { test(); } else { puts("warning: wrong processor count to run the test"); diff --git a/testsuites/smptests/smpschededf03/init.c b/testsuites/smptests/smpschededf03/init.c index 2e46fdb333..f9693f27d2 100644 --- a/testsuites/smptests/smpschededf03/init.c +++ b/testsuites/smptests/smpschededf03/init.c @@ -57,7 +57,7 @@ static void affinity_task(rtems_task_argument arg) uint32_t n; v = (uint32_t) arg; - n = rtems_get_processor_count(); + n = rtems_scheduler_get_processor_maximum(); while (true) { rtems_status_code sc; diff --git a/testsuites/smptests/smpschededf04/init.c b/testsuites/smptests/smpschededf04/init.c index 3111374a94..851c1f6211 100644 --- a/testsuites/smptests/smpschededf04/init.c +++ b/testsuites/smptests/smpschededf04/init.c @@ -90,7 +90,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_get_processor_count() == CPU_COUNT) { + if (rtems_scheduler_get_processor_maximum() == CPU_COUNT) { test(); } else { puts("warning: wrong processor count to run the test"); diff --git a/testsuites/smptests/smpscheduler01/init.c b/testsuites/smptests/smpscheduler01/init.c index a33805b72a..a987f8c865 100644 --- a/testsuites/smptests/smpscheduler01/init.c +++ b/testsuites/smptests/smpscheduler01/init.c @@ -70,7 +70,7 @@ static void task(rtems_task_argument arg) static bool is_per_cpu_state_ok(void) { bool ok = true; - uint32_t n = rtems_get_processor_count(); + uint32_t n = rtems_scheduler_get_processor_maximum(); uint32_t i; for (i = 0; i < n; ++i) { diff --git a/testsuites/smptests/smpscheduler02/init.c b/testsuites/smptests/smpscheduler02/init.c index 1a88c6e4d4..e6480aa819 100644 --- a/testsuites/smptests/smpscheduler02/init.c +++ b/testsuites/smptests/smpscheduler02/init.c @@ -134,7 +134,7 @@ static void test_scheduler_add_remove_processors(void) sc = rtems_scheduler_remove_processor(scheduler_a_id, 0); rtems_test_assert(sc == RTEMS_RESOURCE_IN_USE); - if (rtems_get_processor_count() > 1) { + if (rtems_scheduler_get_processor_maximum() > 1) { rtems_id scheduler_id; rtems_id scheduler_b_id; rtems_id task_id; @@ -224,7 +224,7 @@ static void test(void) rtems_test_assert(rtems_scheduler_get_processor() == 0); - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); main_task_id = rtems_task_self(); CPU_ZERO(&first_cpu); diff --git a/testsuites/smptests/smpscheduler04/init.c b/testsuites/smptests/smpscheduler04/init.c index d79bcd8775..147fe4c9ea 100644 --- a/testsuites/smptests/smpscheduler04/init.c +++ b/testsuites/smptests/smpscheduler04/init.c @@ -46,7 +46,7 @@ static test_context test_instance; static void migration_task(rtems_task_argument arg) { test_context *ctx = (test_context *) arg; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t cpu_index = rtems_scheduler_get_processor(); while (true) { @@ -73,7 +73,7 @@ static void migration_task(rtems_task_argument arg) static void scheduler_task(rtems_task_argument arg) { test_context *ctx = (test_context *) arg; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t cpu_index = rtems_scheduler_get_processor(); while (true) { @@ -107,7 +107,7 @@ static void test(test_context *ctx) rtems_status_code sc; uint32_t i; - for (i = 0; i < rtems_get_processor_count(); ++i) { + for (i = 0; i < rtems_scheduler_get_processor_maximum(); ++i) { sc = rtems_scheduler_ident(i, &ctx->scheduler_ids[i]); rtems_test_assert(sc == RTEMS_SUCCESSFUL); } diff --git a/testsuites/smptests/smpsignal01/init.c b/testsuites/smptests/smpsignal01/init.c index 37c07a69af..dbc06c5b50 100644 --- a/testsuites/smptests/smpsignal01/init.c +++ b/testsuites/smptests/smpsignal01/init.c @@ -224,7 +224,7 @@ static void Init(rtems_task_argument arg) test_isr_level(ctx); - if (rtems_get_processor_count() >= 2) { + if (rtems_scheduler_get_processor_maximum() >= 2) { test_two_processors(ctx); } diff --git a/testsuites/smptests/smpstrongapa01/init.c b/testsuites/smptests/smpstrongapa01/init.c index aae3ffa56e..b4552d520e 100644 --- a/testsuites/smptests/smpstrongapa01/init.c +++ b/testsuites/smptests/smpstrongapa01/init.c @@ -314,7 +314,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_get_processor_count() == CPU_COUNT) { + if (rtems_scheduler_get_processor_maximum() == CPU_COUNT) { test(); } else { puts("warning: wrong processor count to run the test"); diff --git a/testsuites/smptests/smpswitchextension01/init.c b/testsuites/smptests/smpswitchextension01/init.c index 31c64dc49a..c5e962a11a 100644 --- a/testsuites/smptests/smpswitchextension01/init.c +++ b/testsuites/smptests/smpswitchextension01/init.c @@ -225,7 +225,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_get_processor_count() >= 2) { + if (rtems_scheduler_get_processor_maximum() >= 2) { test(); } diff --git a/testsuites/smptests/smpthreadlife01/init.c b/testsuites/smptests/smpthreadlife01/init.c index b47fbe9245..2cfe1627c6 100644 --- a/testsuites/smptests/smpthreadlife01/init.c +++ b/testsuites/smptests/smpthreadlife01/init.c @@ -486,7 +486,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_get_processor_count() >= CPU_COUNT) { + if (rtems_scheduler_get_processor_maximum() >= CPU_COUNT) { test_restart(); test_delete(); test_set_life_protection(0); diff --git a/testsuites/smptests/smpthreadpin01/init.c b/testsuites/smptests/smpthreadpin01/init.c index 3b6060adaf..9bcf9149a9 100644 --- a/testsuites/smptests/smpthreadpin01/init.c +++ b/testsuites/smptests/smpthreadpin01/init.c @@ -570,7 +570,7 @@ static void Init(rtems_task_argument arg) { TEST_BEGIN(); - if (rtems_get_processor_count() == CPU_COUNT) { + if (rtems_scheduler_get_processor_maximum() == CPU_COUNT) { test(&test_instance); } else { puts("warning: wrong processor count to run the test"); diff --git a/testsuites/smptests/smpwakeafter01/init.c b/testsuites/smptests/smpwakeafter01/init.c index 07e260e1a6..1545721a6f 100644 --- a/testsuites/smptests/smpwakeafter01/init.c +++ b/testsuites/smptests/smpwakeafter01/init.c @@ -75,7 +75,7 @@ static void test(void) { rtems_status_code sc; uint32_t test_time_in_seconds = 10; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t i; for (i = 0; i < cpu_count; ++i) { -- cgit v1.2.3