diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-09 13:34:18 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-20 10:14:03 +0200 |
commit | f20b3d568da270e603a27699b6707643a3e7e8ad (patch) | |
tree | d3b6320a024f6306a72296cfabe3e72842dcf4fc /cpukit/score/include/rtems/score/schedulerpriorityimpl.h | |
parent | score: Add _Scheduler_priority_Get_scheduler_info (diff) | |
download | rtems-f20b3d568da270e603a27699b6707643a3e7e8ad.tar.bz2 |
score: Add _Scheduler_priority_Get_ready_queues()
Add and use _Scheduler_priority_Get_ready_queues()
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulerpriorityimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/schedulerpriorityimpl.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h index 7400e58734..0fbece6460 100644 --- a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h +++ b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h @@ -36,6 +36,12 @@ extern "C" { */ /**@{**/ +RTEMS_INLINE_ROUTINE Chain_Control * +_Scheduler_priority_Get_ready_queues( void ) +{ + return ( Chain_Control * ) _Scheduler.information; +} + /** * @brief Ready queue initialization. * @@ -52,7 +58,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(void) ); /* initialize ready queue structures */ - ready_queues = (Chain_Control *) _Scheduler.information; + ready_queues = _Scheduler_priority_Get_ready_queues(); for( index=0; index <= PRIORITY_MAXIMUM; index++) _Chain_Initialize_empty( &ready_queues[index] ); } @@ -181,9 +187,8 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( bool force_dispatch ) { - Thread_Control *heir = _Scheduler_priority_Ready_queue_first( - (Chain_Control *) _Scheduler.information - ); + Chain_Control *ready_queues = _Scheduler_priority_Get_ready_queues(); + Thread_Control *heir = _Scheduler_priority_Ready_queue_first( ready_queues ); ( void ) thread; |