From 03c9f2406127b71ad5abdfd02af1609f8a67f012 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 5 Apr 2019 08:03:12 +0200 Subject: rtems: Add rtems_scheduler_get_processor() Add rtems_scheduler_get_processor() as a replacement for rtems_get_current_processor(). The rtems_get_current_processor() is a bit orphaned. Adopt it by the Scheduler Manager. This is in line with the glibc sched_getcpu() function. Deprecate rtems_get_current_processor(). Update #3731. --- cpukit/libtest/t-test-rtems-measure.c | 2 +- cpukit/libtest/testparallel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cpukit/libtest') diff --git a/cpukit/libtest/t-test-rtems-measure.c b/cpukit/libtest/t-test-rtems-measure.c index 207aef7afa..242855f19f 100644 --- a/cpukit/libtest/t-test-rtems-measure.c +++ b/cpukit/libtest/t-test-rtems-measure.c @@ -115,7 +115,7 @@ load_worker(rtems_task_argument arg) chunk = lctx->chunk; chunk_size = ctx->chunk_size; cache_line_size = ctx->cache_line_size; - token = (unsigned int)rtems_get_current_processor(); + token = (unsigned int)rtems_scheduler_get_processor(); token = dirty_data_cache(chunk, chunk_size, cache_line_size, token); wakeup_master(ctx); diff --git a/cpukit/libtest/testparallel.c b/cpukit/libtest/testparallel.c index 1182242a7b..ea805a3cf4 100644 --- a/cpukit/libtest/testparallel.c +++ b/cpukit/libtest/testparallel.c @@ -74,7 +74,7 @@ static void run_tests( */ rtems_interrupt_local_disable(level); _SMP_barrier_Wait(&ctx->barrier, &bs, ctx->worker_count); - worker_index = rtems_get_current_processor(); + worker_index = rtems_scheduler_get_processor(); rtems_interrupt_local_enable(level); _Assert(worker_index < ctx->worker_count); -- cgit v1.2.3