summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerpriorityyield.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-10 16:15:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-14 16:26:08 +0200
commit6eba7c857b9e72bc4ed8e55f0c9538c45631484f (patch)
tree09847feda8d2183412ab57d59602b3f08481d2ae /cpukit/score/src/schedulerpriorityyield.c
parentscheduler: Add start idle thread operation (diff)
downloadrtems-6eba7c857b9e72bc4ed8e55f0c9538c45631484f.tar.bz2
scheduler: Specify thread of yield operation
The yielding thread of the yield operation is now specified by a parameter. The tick operation may be performed for each executing thread in a SMP configuration.
Diffstat (limited to 'cpukit/score/src/schedulerpriorityyield.c')
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index c000125daf..4c2b5996c1 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -24,28 +24,26 @@
#include <rtems/score/schedulerpriority.h>
#include <rtems/score/thread.h>
-void _Scheduler_priority_Yield(void)
+void _Scheduler_priority_Yield( Thread_Control *thread )
{
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
- Thread_Control *executing;
Chain_Control *ready;
- executing = _Thread_Executing;
- sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
+ sched_info = (Scheduler_priority_Per_thread *) thread->scheduler_info;
ready = sched_info->ready_chain;
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
- _Chain_Extract_unprotected( &executing->Object.Node );
- _Chain_Append_unprotected( ready, &executing->Object.Node );
+ _Chain_Extract_unprotected( &thread->Object.Node );
+ _Chain_Append_unprotected( ready, &thread->Object.Node );
_ISR_Flash( level );
- if ( _Thread_Is_heir( executing ) )
+ if ( _Thread_Is_heir( thread ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
- else if ( !_Thread_Is_heir( executing ) )
+ else if ( !_Thread_Is_heir( thread ) )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );