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/score/include/rtems/score/schedulersimpleimpl.h | |
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-- | cpukit/score/include/rtems/score/schedulersimpleimpl.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/schedulersimpleimpl.h b/cpukit/score/include/rtems/score/schedulersimpleimpl.h index b73a1b2c78..85951fa631 100644 --- a/cpukit/score/include/rtems/score/schedulersimpleimpl.h +++ b/cpukit/score/include/rtems/score/schedulersimpleimpl.h @@ -46,7 +46,8 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_simple_Insert_priority_lifo_order( const Thread_Control *thread_to_insert = (const Thread_Control *) to_insert; const Thread_Control *thread_next = (const Thread_Control *) next; - return thread_to_insert->current_priority <= thread_next->current_priority; + return _Thread_Get_priority( thread_to_insert ) + <= _Thread_Get_priority( thread_next ); } RTEMS_INLINE_ROUTINE bool _Scheduler_simple_Insert_priority_fifo_order( @@ -57,7 +58,8 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_simple_Insert_priority_fifo_order( const Thread_Control *thread_to_insert = (const Thread_Control *) to_insert; const Thread_Control *thread_next = (const Thread_Control *) next; - return thread_to_insert->current_priority < thread_next->current_priority; + return _Thread_Get_priority( thread_to_insert ) + < _Thread_Get_priority( thread_next ); } RTEMS_INLINE_ROUTINE void _Scheduler_simple_Insert_priority_lifo( |