summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-03 15:03:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-04 11:01:18 +0200
commit24934e36e2513f972510d7c746103be1f766dc6a (patch)
tree66e3c8840cec6c1262f142e25ec545926140dbf9 /cpukit/score/include/rtems/score/schedulerpriorityimpl.h
parentscore: Add and use Scheduler_simple_Control (diff)
downloadrtems-24934e36e2513f972510d7c746103be1f766dc6a.tar.bz2
score: Add scheduler control to scheduler ops
Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulerpriorityimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/schedulerpriorityimpl.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
index ebcc3f1762..7861df5c90 100644
--- a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
@@ -36,9 +36,9 @@ extern "C" {
/**@{**/
RTEMS_INLINE_ROUTINE Scheduler_priority_Control *
- _Scheduler_priority_Instance( void )
+ _Scheduler_priority_Self_from_base( Scheduler_Control *scheduler_base )
{
- return _Scheduler.information;
+ return (Scheduler_priority_Control *) scheduler_base->information;
}
/**
@@ -134,10 +134,12 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
}
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Extract_body(
- Thread_Control *the_thread
+ Scheduler_Control *scheduler_base,
+ Thread_Control *the_thread
)
{
- Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance();
+ Scheduler_priority_Control *scheduler =
+ _Scheduler_priority_Self_from_base( scheduler_base );
_Scheduler_priority_Ready_queue_extract( the_thread, &scheduler->Bit_map );
}
@@ -191,17 +193,19 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_requeue(
* for priority-based scheduling.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
- Thread_Control *thread,
- bool force_dispatch
+ Scheduler_Control *scheduler_base,
+ Thread_Control *the_thread,
+ bool force_dispatch
)
{
- Scheduler_priority_Control *scheduler = _Scheduler_priority_Instance();
+ Scheduler_priority_Control *scheduler =
+ _Scheduler_priority_Self_from_base( scheduler_base );
Thread_Control *heir = _Scheduler_priority_Ready_queue_first(
&scheduler->Bit_map,
&scheduler->Ready[ 0 ]
);
- ( void ) thread;
+ ( void ) the_thread;
_Scheduler_Update_heir( heir, force_dispatch );
}