diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-28 06:54:50 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-09-08 09:55:28 +0200 |
commit | b20b736382280fb522d176273645a7e955a97a60 (patch) | |
tree | beb78ee50ef8b6a9257ecf5f8d276af35db11c5a /testsuites/sptests/sp34/changepri.c | |
parent | score: Add scheduler node implementation header (diff) | |
download | rtems-b20b736382280fb522d176273645a7e955a97a60.tar.bz2 |
score: Introduce _Thread_Get_priority()
Avoid direct access to thread internal data fields.
Diffstat (limited to '')
-rw-r--r-- | testsuites/sptests/sp34/changepri.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuites/sptests/sp34/changepri.c b/testsuites/sptests/sp34/changepri.c index f32f6ec3c6..5000f693d3 100644 --- a/testsuites/sptests/sp34/changepri.c +++ b/testsuites/sptests/sp34/changepri.c @@ -29,6 +29,8 @@ #include <stdio.h> #include "tmacros.h" +#include <rtems/score/threadimpl.h> + const char rtems_test_name[] = "SP 34"; rtems_task BlockingTasks(rtems_task_argument arg); @@ -44,7 +46,7 @@ const char *CallerName(void) Thread_Control *executing = _Thread_Get_executing(); #if defined(TEST_PRINT_TASK_ID) sprintf( buffer, "0x%08x -- %d", - rtems_task_self(), executing->current_priority ); + rtems_task_self(), _Thread_Get_priority( executing ) ); #else volatile union { uint32_t u; @@ -58,7 +60,7 @@ const char *CallerName(void) #endif sprintf( buffer, "%c%c%c%c -- %" PRIdPriority_Control, TempName.c[0], TempName.c[1], TempName.c[2], TempName.c[3], - executing->current_priority + _Thread_Get_priority( executing ) ); #endif return buffer; |