summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smpload01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-05 08:16:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-09 08:06:46 +0200
commitf9219db2a95c8285d1be22092572b4236bfe6488 (patch)
treec168ac7fdf7458cea6d7146584b2adb38d47f6a1 /testsuites/smptests/smpload01
parentrtems: Add rtems_scheduler_get_processor() (diff)
downloadrtems-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/smpload01')
-rw-r--r--testsuites/smptests/smpload01/init.c6
1 files changed, 3 insertions, 3 deletions
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,