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. --- testsuites/smptests/smppsxmutex01/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testsuites/smptests/smppsxmutex01') diff --git a/testsuites/smptests/smppsxmutex01/init.c b/testsuites/smptests/smppsxmutex01/init.c index 5ba24baadc..a634c76962 100644 --- a/testsuites/smptests/smppsxmutex01/init.c +++ b/testsuites/smptests/smppsxmutex01/init.c @@ -50,7 +50,7 @@ static void *thread_b(void *arg) ctx = arg; - rtems_test_assert(rtems_get_current_processor() == 0); + rtems_test_assert(rtems_scheduler_get_processor() == 0); sc = rtems_scheduler_ident(SCHED_B, &scheduler_b_id); rtems_test_assert(sc == RTEMS_SUCCESSFUL); @@ -61,7 +61,7 @@ static void *thread_b(void *arg) sc = rtems_task_set_scheduler(pthread_self(), scheduler_b_id, prio); rtems_test_assert(sc == RTEMS_SUCCESSFUL); - rtems_test_assert(rtems_get_current_processor() == 1); + rtems_test_assert(rtems_scheduler_get_processor() == 1); eno = pthread_mutex_init(&ctx->mtx_b, &ctx->mtx_attr); rtems_test_assert(eno == 0); @@ -97,7 +97,7 @@ static void test(test_context *ctx) cpu_count = rtems_get_processor_count(); - rtems_test_assert(rtems_get_current_processor() == 0); + rtems_test_assert(rtems_scheduler_get_processor() == 0); eno = pthread_mutexattr_init(&ctx->mtx_attr); rtems_test_assert(eno == 0); -- cgit v1.2.3