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 /cpukit/rtems | |
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 'cpukit/rtems')
-rw-r--r-- | cpukit/rtems/src/tasksetpriority.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/rtems/src/tasksetpriority.c b/cpukit/rtems/src/tasksetpriority.c index 0a2df6e1ca..9779c973a1 100644 --- a/cpukit/rtems/src/tasksetpriority.c +++ b/cpukit/rtems/src/tasksetpriority.c @@ -43,7 +43,7 @@ static bool _RTEMS_tasks_Set_priority_filter( context = arg; scheduler = _Scheduler_Get_own( the_thread ); - current_priority = the_thread->current_priority; + current_priority = _Thread_Get_priority( the_thread ); context->scheduler = scheduler; context->old_priority = current_priority; @@ -117,7 +117,7 @@ rtems_status_code rtems_task_set_priority( } else { _Thread_State_acquire_critical( the_thread, &lock_context ); scheduler = _Scheduler_Get_own( the_thread ); - old_priority = the_thread->current_priority; + old_priority = _Thread_Get_priority( the_thread ); _Thread_State_release( the_thread, &lock_context ); status = RTEMS_SUCCESSFUL; } |