summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerpriorityyield.c
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/src/schedulerpriorityyield.c
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/src/schedulerpriorityyield.c')
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index 1e83c557cf..2bcefa5eb7 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -22,25 +22,30 @@
#include <rtems/score/isr.h>
#include <rtems/score/threadimpl.h>
-void _Scheduler_priority_Yield( Thread_Control *thread )
+void _Scheduler_priority_Yield(
+ Scheduler_Control *base,
+ Thread_Control *the_thread
+)
{
Scheduler_priority_Per_thread *sched_info_of_thread =
- _Scheduler_priority_Get_scheduler_info( thread );
+ _Scheduler_priority_Get_scheduler_info( the_thread );
Chain_Control *ready_chain = sched_info_of_thread->ready_chain;
ISR_Level level;
+ (void) base;
+
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready_chain ) ) {
- _Chain_Extract_unprotected( &thread->Object.Node );
- _Chain_Append_unprotected( ready_chain, &thread->Object.Node );
+ _Chain_Extract_unprotected( &the_thread->Object.Node );
+ _Chain_Append_unprotected( ready_chain, &the_thread->Object.Node );
_ISR_Flash( level );
- if ( _Thread_Is_heir( thread ) )
+ if ( _Thread_Is_heir( the_thread ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready_chain );
_Thread_Dispatch_necessary = true;
}
- else if ( !_Thread_Is_heir( thread ) )
+ else if ( !_Thread_Is_heir( the_thread ) )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );