diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-04-05 08:16:05 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-04-09 08:06:46 +0200 |
commit | f9219db2a95c8285d1be22092572b4236bfe6488 (patch) | |
tree | c168ac7fdf7458cea6d7146584b2adb38d47f6a1 /testsuites/smptests/smp01 | |
parent | rtems: Add rtems_scheduler_get_processor() (diff) | |
download | rtems-f9219db2a95c8285d1be22092572b4236bfe6488.tar.bz2 |
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.
Diffstat (limited to 'testsuites/smptests/smp01')
-rw-r--r-- | testsuites/smptests/smp01/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |