summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-09-23 13:24:06 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-02 10:05:42 +0100
commitebdd2a343181ef5f3fc2f1330930b0ea5c0ed8a4 (patch)
treed3d50b10d232eb7e1ccc743b07b8f7ab1d195660 /cpukit/score/include/rtems/score/schedulerimpl.h
parentscore: Protect thread CPU by thread scheduler lock (diff)
downloadrtems-ebdd2a343181ef5f3fc2f1330930b0ea5c0ed8a4.tar.bz2
score: Add scheduler node requests
Add the ability to add/remove scheduler nodes to/from the set of scheduler nodes available to the schedulers for a particular thread. Update #2556.
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulerimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index 6d2f5a1981..26da986c4f 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -1471,6 +1471,14 @@ RTEMS_INLINE_ROUTINE Status_Control _Scheduler_Set(
&the_thread->Scheduler.Wait_nodes,
&new_scheduler_node->Thread.Wait_node
);
+ _Chain_Extract_unprotected(
+ &old_scheduler_node->Thread.Scheduler_node.Chain
+ );
+ _Assert( _Chain_Is_empty( &the_thread->Scheduler.Scheduler_nodes ) );
+ _Chain_Initialize_one(
+ &the_thread->Scheduler.Scheduler_nodes,
+ &new_scheduler_node->Thread.Scheduler_node.Chain
+ );
{
const Scheduler_Control *old_scheduler;