summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthread.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/posix/src/pthread.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/posix/src/pthread.c')
-rw-r--r--cpukit/posix/src/pthread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index b29acaeea5..a1394a5dee 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -97,7 +97,7 @@ static bool _POSIX_Threads_Sporadic_timer_filter(
new_priority = api->Sporadic.high_priority;
*new_priority_p = new_priority;
- current_priority = the_thread->current_priority;
+ current_priority = _Thread_Get_priority( the_thread );
the_thread->real_priority = new_priority;
_Watchdog_Per_CPU_remove_relative( &api->Sporadic.Timer );
@@ -145,7 +145,7 @@ static bool _POSIX_Threads_Sporadic_budget_callout_filter(
new_priority = api->Sporadic.low_priority;
*new_priority_p = new_priority;
- current_priority = the_thread->current_priority;
+ current_priority = _Thread_Get_priority( the_thread );
the_thread->real_priority = new_priority;
return _Thread_Priority_less_than( current_priority, new_priority )
@@ -184,7 +184,7 @@ static bool _POSIX_Threads_Create_extension(
_POSIX_Threads_Initialize_attributes( &api->Attributes );
api->Attributes.schedparam.sched_priority = _POSIX_Priority_From_core(
_Scheduler_Get_own( created ),
- created->current_priority
+ _Thread_Get_priority( created )
);
/*