summaryrefslogtreecommitdiffstats
path: root/testsuites/smptests/smppsxmutex01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-05 08:03:12 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-09 08:06:46 +0200
commit03c9f2406127b71ad5abdfd02af1609f8a67f012 (patch)
tree0da26b51a42fdcd2403bc12445ffed8066d27547 /testsuites/smptests/smppsxmutex01
parentscore: Add RTEMS_CONST (diff)
downloadrtems-03c9f2406127b71ad5abdfd02af1609f8a67f012.tar.bz2
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.
Diffstat (limited to 'testsuites/smptests/smppsxmutex01')
-rw-r--r--testsuites/smptests/smppsxmutex01/init.c6
1 files changed, 3 insertions, 3 deletions
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);