diff options
Diffstat (limited to 'testsuites')
46 files changed, 104 insertions, 76 deletions
diff --git a/testsuites/psxtests/psxsysconf/init.c b/testsuites/psxtests/psxsysconf/init.c index 2dd9018722..a008af36bb 100644 --- a/testsuites/psxtests/psxsysconf/init.c +++ b/testsuites/psxtests/psxsysconf/init.c @@ -79,7 +79,8 @@ void *POSIX_Init( ); rtems_test_assert( - sysconf( _SC_NPROCESSORS_ONLN ) == (long) rtems_get_processor_count() + sysconf( _SC_NPROCESSORS_ONLN ) + == (long) rtems_scheduler_get_processor_maximum() ); #if defined(__sparc__) 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; i<rtems_get_processor_count() ; i++ ) { + for ( i=0; i<rtems_scheduler_get_processor_maximum() ; i++ ) { TaskRan[i] = false; } /* Create and start tasks for each processor */ - for ( i=0; i< rtems_get_processor_count() ; i++ ) { + for ( i=0; i< rtems_scheduler_get_processor_maximum() ; i++ ) { if ( i != cpu_self ) { ch = '0' + i; @@ -78,7 +78,7 @@ rtems_task Init( /* Wait on the all tasks to run */ while (1) { allDone = true; - for ( i=0; i<rtems_get_processor_count() ; i++ ) { + for ( i=0; i<rtems_scheduler_get_processor_maximum() ; i++ ) { if ( i != cpu_self && TaskRan[i] == false) allDone = false; } diff --git a/testsuites/smptests/smp02/init.c b/testsuites/smptests/smp02/init.c index fd7c583db8..f7ce857ee3 100644 --- a/testsuites/smptests/smp02/init.c +++ b/testsuites/smptests/smp02/init.c @@ -40,7 +40,7 @@ rtems_task Init( locked_print_initialize(); - if ( rtems_get_processor_count() == 1 ) { + if ( rtems_scheduler_get_processor_maximum() == 1 ) { success(); } @@ -59,7 +59,7 @@ rtems_task Init( status = rtems_semaphore_obtain( Semaphore, RTEMS_WAIT, 0); directive_failed( status,"rtems_semaphore_obtain of SEM1\n"); - for ( i=1; i < rtems_get_processor_count(); i++ ){ + for ( i=1; i < rtems_scheduler_get_processor_maximum(); i++ ){ /* Create and start tasks for each CPU */ ch = '0' + i; diff --git a/testsuites/smptests/smp03/init.c b/testsuites/smptests/smp03/init.c index 1e9bb69f7a..9f5171128c 100644 --- a/testsuites/smptests/smp03/init.c +++ b/testsuites/smptests/smp03/init.c @@ -50,20 +50,22 @@ rtems_task Init( char ch = '0'; rtems_id id; rtems_status_code status; + uint32_t cpu_max; Loop(); TEST_BEGIN(); locked_print_initialize(); + cpu_max = rtems_scheduler_get_processor_maximum(); - if ( rtems_get_processor_count() == 1 ) { + if ( cpu_max == 1 ) { success(); } /* Initialize the TaskRan array */ TaskRan[0] = true; - for ( i=1; i<rtems_get_processor_count() ; i++ ) { + for ( i=1; i<cpu_max ; i++ ) { TaskRan[i] = false; } @@ -71,7 +73,7 @@ rtems_task Init( PrintTaskInfo( "Init" ); /* for each remaining cpu create and start a task */ - for ( i=1; i < rtems_get_processor_count(); i++ ){ + for ( i=1; i < cpu_max; i++ ){ ch = '0' + i; @@ -104,13 +106,13 @@ rtems_task Init( &id ); directive_failed( status, "rtems_task_create" ); - status = rtems_task_start(id,Test_task,rtems_get_processor_count()); + status = rtems_task_start(id,Test_task,cpu_max); directive_failed( status, "rtems_task_start" ); /* Wait on all tasks to run */ while (1) { TestFinished = true; - for ( i=1; i < (rtems_get_processor_count()+1) ; i++ ) { + for ( i=1; i < (cpu_max+1) ; i++ ) { if (TaskRan[i] == false) TestFinished = false; } diff --git a/testsuites/smptests/smp05/init.c b/testsuites/smptests/smp05/init.c index bc2c6cd5ac..75033ff5ae 100644 --- a/testsuites/smptests/smp05/init.c +++ b/testsuites/smptests/smp05/init.c @@ -52,11 +52,11 @@ rtems_task Init( locked_print_initialize(); TEST_BEGIN(); - if ( rtems_get_processor_count() == 1 ) { + if ( rtems_scheduler_get_processor_maximum() == 1 ) { success(); } - for ( i=0; i<rtems_get_processor_count() ; i++ ) { + for ( i=0; i<rtems_scheduler_get_processor_maximum() ; i++ ) { ch = '1' + i; status = rtems_task_create( diff --git a/testsuites/smptests/smp07/init.c b/testsuites/smptests/smp07/init.c index e4ea76183b..c53642054c 100644 --- a/testsuites/smptests/smp07/init.c +++ b/testsuites/smptests/smp07/init.c @@ -99,7 +99,7 @@ rtems_task Init( locked_print_initialize(); TEST_BEGIN(); - if ( rtems_get_processor_count() == 1 ) { + if ( rtems_scheduler_get_processor_maximum() == 1 ) { success(); } diff --git a/testsuites/smptests/smp08/init.c b/testsuites/smptests/smp08/init.c index de98865735..5c27a6a084 100644 --- a/testsuites/smptests/smp08/init.c +++ b/testsuites/smptests/smp08/init.c @@ -76,7 +76,7 @@ rtems_task Init( /* Show that the init task is running on this cpu */ PrintTaskInfo( "Init", &time ); - for ( i=1; i <= rtems_get_processor_count() *3; i++ ) { + for ( i=1; i <= rtems_scheduler_get_processor_maximum() *3; i++ ) { sprintf(ch, "%02" PRIu32, i ); status = rtems_task_create( diff --git a/testsuites/smptests/smp09/init.c b/testsuites/smptests/smp09/init.c index f36f8691b7..ce8334bcd4 100644 --- a/testsuites/smptests/smp09/init.c +++ b/testsuites/smptests/smp09/init.c @@ -53,7 +53,7 @@ rtems_task Init( for ( killtime=0; killtime<1000000; killtime++ ) ; - for ( i=0; i<rtems_get_processor_count() -1; i++ ) { + for ( i=0; i<rtems_scheduler_get_processor_maximum() -1; i++ ) { ch = '1' + i; status = rtems_task_create( diff --git a/testsuites/smptests/smpaffinity01/init.c b/testsuites/smptests/smpaffinity01/init.c index 4c052ae12a..5d79259e9f 100644 --- a/testsuites/smptests/smpaffinity01/init.c +++ b/testsuites/smptests/smpaffinity01/init.c @@ -112,7 +112,7 @@ void Validate_affinity(void ) directive_failed( sc, "Get Affinity of Init Task" ); /* 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/smpcache01/init.c b/testsuites/smptests/smpcache01/init.c index a679764d5d..313a3df2e4 100644 --- a/testsuites/smptests/smpcache01/init.c +++ b/testsuites/smptests/smpcache01/init.c @@ -82,7 +82,11 @@ static void test_cache_invalidate_multiple_instruction_lines( static void barrier( SMP_barrier_State *bs ) { - _SMP_barrier_Wait( &ctx.barrier, bs, rtems_get_processor_count() ); + _SMP_barrier_Wait( + &ctx.barrier, + bs, + rtems_scheduler_get_processor_maximum() + ); } static void broadcast_test_init( void ) @@ -101,7 +105,8 @@ static void broadcast_test_body( static void broadcast_test_fini( void ) { rtems_test_assert( - ctx.count[rtems_scheduler_get_processor()] == rtems_get_processor_count() + ctx.count[rtems_scheduler_get_processor()] + == rtems_scheduler_get_processor_maximum() ); } @@ -175,9 +180,9 @@ static void cmlog( const char* str ) static void all_tests( void ) { - uint32_t cpu_count = rtems_get_processor_count(); - size_t set_size = CPU_ALLOC_SIZE( rtems_get_processor_count() ); - cpu_set_t *cpu_set = CPU_ALLOC( rtems_get_processor_count() ); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); + size_t set_size = CPU_ALLOC_SIZE( cpu_count ); + cpu_set_t *cpu_set = CPU_ALLOC( cpu_count ); SMP_barrier_State bs = SMP_BARRIER_STATE_INITIALIZER; /* Send message to all available CPUs */ @@ -217,7 +222,7 @@ static void test_smp_cache_manager( void ) { rtems_status_code sc; size_t worker_index; - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); for (worker_index = 1; worker_index < cpu_count; ++worker_index) { rtems_id worker_id; diff --git a/testsuites/smptests/smpcapture01/init.c b/testsuites/smptests/smpcapture01/init.c index 52f762eda2..1e3e797ca8 100644 --- a/testsuites/smptests/smpcapture01/init.c +++ b/testsuites/smptests/smpcapture01/init.c @@ -103,7 +103,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/smpcapture02/init.c b/testsuites/smptests/smpcapture02/init.c index 9fc820ef6f..fa801218e6 100644 --- a/testsuites/smptests/smpcapture02/init.c +++ b/testsuites/smptests/smpcapture02/init.c @@ -301,7 +301,7 @@ static void Init(rtems_task_argument arg) TEST_BEGIN(); /* Get the number of processors that we are using. */ - cpu_count = rtems_get_processor_count(); + cpu_count = rtems_scheduler_get_processor_maximum(); sc = rtems_capture_open(50000, NULL); rtems_test_assert(sc == RTEMS_SUCCESSFUL); diff --git a/testsuites/smptests/smpclock01/init.c b/testsuites/smptests/smpclock01/init.c index 4887ec20e7..109d4bae34 100644 --- a/testsuites/smptests/smpclock01/init.c +++ b/testsuites/smptests/smpclock01/init.c @@ -161,7 +161,7 @@ static void Init(rtems_task_argument arg) rtems_resource_snapshot_take(&snapshot); - if (rtems_get_processor_count() == CPU_COUNT) { + if (rtems_scheduler_get_processor_maximum() == CPU_COUNT) { test(); } diff --git a/testsuites/smptests/smpfatal01/init.c b/testsuites/smptests/smpfatal01/init.c index 463f35acbb..e26d66fdc5 100644 --- a/testsuites/smptests/smpfatal01/init.c +++ b/testsuites/smptests/smpfatal01/init.c @@ -67,7 +67,11 @@ static void fatal_extension( } } - _SMP_barrier_Wait(&barrier, &barrier_state, rtems_get_processor_count()); + _SMP_barrier_Wait( + &barrier, + &barrier_state, + rtems_scheduler_get_processor_maximum() + ); } static rtems_status_code test_driver_init( @@ -77,7 +81,7 @@ static rtems_status_code test_driver_init( ) { uint32_t self = rtems_scheduler_get_processor(); - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t cpu; TEST_BEGIN(); diff --git a/testsuites/smptests/smpfatal02/init.c b/testsuites/smptests/smpfatal02/init.c index 217c7a1758..640178a84a 100644 --- a/testsuites/smptests/smpfatal02/init.c +++ b/testsuites/smptests/smpfatal02/init.c @@ -71,7 +71,11 @@ static void fatal_extension( assert(code == SMP_FATAL_SHUTDOWN); } - _SMP_barrier_Wait(&barrier, &barrier_state, rtems_get_processor_count()); + _SMP_barrier_Wait( + &barrier, + &barrier_state, + rtems_scheduler_get_processor_maximum() + ); } static rtems_status_code test_driver_init( @@ -81,7 +85,7 @@ static rtems_status_code test_driver_init( ) { uint32_t self = rtems_scheduler_get_processor(); - uint32_t cpu_count = rtems_get_processor_count(); + uint32_t cpu_count = rtems_scheduler_get_processor_maximum(); uint32_t cpu; TEST_BEGIN(); diff --git a/testsuites/smptests/smpipi01/init.c b/testsuites/smptests/smpipi01/init.c index 3389e85a11..8f42c574a0 100644 --- a/testsuites/smptests/smpipi01/init.c +++ b/testsuites/smptests/smpipi01/init.c @@ -78,7 +78,7 @@ static void test_send_message_while_processing_a_message( 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; SMP_barrier_State *bs = &ctx->main_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) { diff --git a/testsuites/sptests/sppercpudata01/init.c b/testsuites/sptests/sppercpudata01/init.c index 94f5185d4e..eec4883e92 100644 --- a/testsuites/sptests/sppercpudata01/init.c +++ b/testsuites/sptests/sppercpudata01/init.c @@ -68,7 +68,11 @@ static void test_initial_values(void) { uint32_t cpu_index; - for (cpu_index = 0; cpu_index < rtems_get_processor_count(); ++cpu_index) { + for ( + cpu_index = 0; + cpu_index < rtems_scheduler_get_processor_maximum(); + ++cpu_index + ) { Per_CPU_Control *cpu; unsigned char *c; unsigned short *s; @@ -137,7 +141,11 @@ static void set_unique_values(unsigned int v) { uint32_t cpu_index; - for (cpu_index = 0; cpu_index < rtems_get_processor_count(); ++cpu_index) { + for ( + cpu_index = 0; + cpu_index < rtems_scheduler_get_processor_maximum(); + ++cpu_index + ) { Per_CPU_Control *cpu; unsigned char *c; unsigned short *s; @@ -196,7 +204,11 @@ static void test_unique_values(unsigned int v) { uint32_t cpu_index; - for (cpu_index = 0; cpu_index < rtems_get_processor_count(); ++cpu_index) { + for ( + cpu_index = 0; + cpu_index < rtems_scheduler_get_processor_maximum(); + ++cpu_index + ) { Per_CPU_Control *cpu; unsigned char *c; unsigned short *s; diff --git a/testsuites/tmtests/tmcontext01/init.c b/testsuites/tmtests/tmcontext01/init.c index 849bfba04d..be4c606c07 100644 --- a/testsuites/tmtests/tmcontext01/init.c +++ b/testsuites/tmtests/tmcontext01/init.c @@ -230,7 +230,7 @@ static void Init(rtems_task_argument arg) test(false, load); test(true, load); - for (load = 1; load < rtems_get_processor_count(); ++load) { + for (load = 1; load < rtems_scheduler_get_processor_maximum(); ++load) { rtems_status_code sc; rtems_id id; volatile int *load_data = NULL; |