summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-31 08:08:48 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-02 10:05:45 +0100
commitc0f1f52763b3a231a329da0162979207519a6db6 (patch)
tree810b7ddeb8c8714beda21b2414eea511e711d9c3
parentscore: Delete Scheduler_Node::accepts_help (diff)
downloadrtems-c0f1f52763b3a231a329da0162979207519a6db6.tar.bz2
score: Delete Thread_Scheduler_control::node
Update #2556.
-rw-r--r--cpukit/score/include/rtems/score/schedulercbsimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/scheduleredfimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h12
-rw-r--r--cpukit/score/include/rtems/score/schedulerpriorityimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/schedulersmpimpl.h2
-rw-r--r--cpukit/score/include/rtems/score/thread.h17
-rw-r--r--cpukit/score/src/schedulerpriorityaffinitysmp.c2
-rw-r--r--cpukit/score/src/threadinitialize.c1
9 files changed, 12 insertions, 30 deletions
diff --git a/cpukit/score/include/rtems/score/schedulercbsimpl.h b/cpukit/score/include/rtems/score/schedulercbsimpl.h
index 84f6b5d029..ed75979f75 100644
--- a/cpukit/score/include/rtems/score/schedulercbsimpl.h
+++ b/cpukit/score/include/rtems/score/schedulercbsimpl.h
@@ -40,7 +40,7 @@ RTEMS_INLINE_ROUTINE Scheduler_CBS_Node *_Scheduler_CBS_Thread_get_node(
Thread_Control *the_thread
)
{
- return (Scheduler_CBS_Node *) _Scheduler_Thread_get_node( the_thread );
+ return (Scheduler_CBS_Node *) _Thread_Scheduler_get_home_node( the_thread );
}
RTEMS_INLINE_ROUTINE Scheduler_CBS_Node *_Scheduler_CBS_Node_downcast(
diff --git a/cpukit/score/include/rtems/score/scheduleredfimpl.h b/cpukit/score/include/rtems/score/scheduleredfimpl.h
index bfb5b45875..94a78fcff5 100644
--- a/cpukit/score/include/rtems/score/scheduleredfimpl.h
+++ b/cpukit/score/include/rtems/score/scheduleredfimpl.h
@@ -50,7 +50,7 @@ RTEMS_INLINE_ROUTINE Scheduler_EDF_Node *_Scheduler_EDF_Thread_get_node(
Thread_Control *the_thread
)
{
- return (Scheduler_EDF_Node *) _Scheduler_Thread_get_node( the_thread );
+ return (Scheduler_EDF_Node *) _Thread_Scheduler_get_home_node( the_thread );
}
RTEMS_INLINE_ROUTINE Scheduler_EDF_Node * _Scheduler_EDF_Node_downcast(
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index f606c1def6..aaa28e0129 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -149,17 +149,6 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Release_critical(
#endif
}
-RTEMS_INLINE_ROUTINE Scheduler_Node *_Scheduler_Thread_get_node(
- const Thread_Control *the_thread
-)
-{
-#if defined(RTEMS_SMP)
- return the_thread->Scheduler.node;
-#else
- return the_thread->Scheduler.nodes;
-#endif
-}
-
/**
* The preferred method to add a new scheduler is to define the jump table
* entries and add a case to the _Scheduler_Initialize routine.
@@ -1326,7 +1315,6 @@ RTEMS_INLINE_ROUTINE Status_Control _Scheduler_Set(
the_thread->Scheduler.own_control = new_scheduler;
the_thread->Scheduler.control = new_scheduler;
the_thread->Scheduler.own_node = new_scheduler_node;
- the_thread->Scheduler.node = new_scheduler_node;
_Scheduler_Node_set_priority( new_scheduler_node, priority, false );
if ( _States_Is_ready( current_state ) ) {
diff --git a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
index e9e987318c..68c61c16f3 100644
--- a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
@@ -45,7 +45,7 @@ RTEMS_INLINE_ROUTINE Scheduler_priority_Node *_Scheduler_priority_Thread_get_nod
Thread_Control *the_thread
)
{
- return (Scheduler_priority_Node *) _Scheduler_Thread_get_node( the_thread );
+ return (Scheduler_priority_Node *) _Thread_Scheduler_get_home_node( the_thread );
}
RTEMS_INLINE_ROUTINE Scheduler_priority_Node *_Scheduler_priority_Node_downcast(
diff --git a/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h b/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
index 9ae01038b6..4fe4d29248 100644
--- a/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerprioritysmpimpl.h
@@ -48,7 +48,7 @@ static inline Scheduler_priority_SMP_Node *_Scheduler_priority_SMP_Thread_get_no
Thread_Control *thread
)
{
- return (Scheduler_priority_SMP_Node *) _Scheduler_Thread_get_node( thread );
+ return (Scheduler_priority_SMP_Node *) _Thread_Scheduler_get_home_node( thread );
}
static inline Scheduler_priority_SMP_Node *
diff --git a/cpukit/score/include/rtems/score/schedulersmpimpl.h b/cpukit/score/include/rtems/score/schedulersmpimpl.h
index ea7d88be06..bfd7650bea 100644
--- a/cpukit/score/include/rtems/score/schedulersmpimpl.h
+++ b/cpukit/score/include/rtems/score/schedulersmpimpl.h
@@ -376,7 +376,7 @@ static inline Scheduler_SMP_Node *_Scheduler_SMP_Thread_get_node(
Thread_Control *thread
)
{
- return (Scheduler_SMP_Node *) _Scheduler_Thread_get_node( thread );
+ return (Scheduler_SMP_Node *) _Thread_Scheduler_get_home_node( thread );
}
static inline Scheduler_SMP_Node *_Scheduler_SMP_Thread_get_own_node(
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 3ec61f8b5e..76cc333782 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -277,17 +277,6 @@ typedef struct {
Scheduler_Node *own_node;
/**
- * @brief The scheduler node of this thread.
- *
- * On uni-processor configurations this field is constant after
- * initialization.
- *
- * On SMP configurations the scheduler helping protocol may change this
- * field.
- */
- Scheduler_Node *node;
-
- /**
* @brief The processor assigned by the current scheduler.
*/
struct Per_CPU_Control *cpu;
@@ -297,6 +286,9 @@ typedef struct {
* scheduler instance and due to thread queue ownerships.
*
* This chain is protected by the thread wait lock.
+ *
+ * This chain is never empty. The first scheduler node on the chain is the
+ * scheduler node of the home scheduler instance.
*/
Chain_Control Wait_nodes;
@@ -305,6 +297,9 @@ typedef struct {
* thread.
*
* This chain is protected by the thread state lock.
+ *
+ * This chain is never empty. The first scheduler node on the chain is the
+ * scheduler node of the home scheduler instance.
*/
Chain_Control Scheduler_nodes;
diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c
index 1163a1a478..9c8fd3cd51 100644
--- a/cpukit/score/src/schedulerpriorityaffinitysmp.c
+++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c
@@ -70,7 +70,7 @@ _Scheduler_priority_affinity_SMP_Thread_get_node(
)
{
return (Scheduler_priority_affinity_SMP_Node *)
- _Scheduler_Thread_get_node( thread );
+ _Thread_Scheduler_get_home_node( thread );
}
static Scheduler_priority_affinity_SMP_Node *
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index f151989a3f..37feb372ff 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -235,7 +235,6 @@ bool _Thread_Initialize(
the_thread->Scheduler.own_control = scheduler;
the_thread->Scheduler.control = scheduler;
the_thread->Scheduler.own_node = scheduler_node;
- the_thread->Scheduler.node = scheduler_node;
_ISR_lock_Initialize( &the_thread->Scheduler.Lock, "Thread Scheduler" );
_ISR_lock_Initialize( &the_thread->Wait.Lock.Default, "Thread Wait Default" );
_Thread_queue_Gate_open( &the_thread->Wait.Lock.Tranquilizer );