summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagetop.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-28 06:54:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-09-08 09:55:28 +0200
commitb20b736382280fb522d176273645a7e955a97a60 (patch)
treebeb78ee50ef8b6a9257ecf5f8d276af35db11c5a /cpukit/libmisc/cpuuse/cpuusagetop.c
parentscore: Add scheduler node implementation header (diff)
downloadrtems-b20b736382280fb522d176273645a7e955a97a60.tar.bz2
score: Introduce _Thread_Get_priority()
Avoid direct access to thread internal data fields.
Diffstat (limited to 'cpukit/libmisc/cpuuse/cpuusagetop.c')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagetop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c b/cpukit/libmisc/cpuuse/cpuusagetop.c
index aa2b74c160..ccf32de4d7 100644
--- a/cpukit/libmisc/cpuuse/cpuusagetop.c
+++ b/cpukit/libmisc/cpuuse/cpuusagetop.c
@@ -264,8 +264,12 @@ task_usage(Thread_Control* thread, void* arg)
if (thread->real_priority > data->tasks[j]->real_priority)
continue;
case RTEMS_TOP_SORT_CURRENT_PRI:
- if (thread->current_priority > data->tasks[j]->current_priority)
+ if (
+ _Thread_Get_priority( thread )
+ > _Thread_Get_priority( data->tasks[j] )
+ ) {
continue;
+ }
case RTEMS_TOP_SORT_ID:
if (thread->Object.id < data->tasks[j]->Object.id)
continue;
@@ -478,7 +482,7 @@ rtems_cpuusage_top_thread (rtems_task_argument arg)
thread->Object.id,
name,
thread->real_priority,
- thread->current_priority);
+ _Thread_Get_priority(thread));
usage = data->usage[i];
current_usage = data->current_usage[i];