[rtems commit] score: _Scheduler_Thread_get_own_node()

Sebastian Huber sebh at rtems.org
Wed Jul 9 09:14:03 UTC 2014


Module:    rtems
Branch:    master
Commit:    c6048ee2c52e37091492843441afd020bb97c34a
Changeset: http://git.rtems.org/rtems/commit/?id=c6048ee2c52e37091492843441afd020bb97c34a

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jul  9 11:20:23 2014 +0200

score: _Scheduler_Thread_get_own_node()

Provide this function also for uni-processor configurations.

---

 cpukit/score/include/rtems/score/schedulerimpl.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index c41c3af..4f71408 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -98,14 +98,18 @@ RTEMS_INLINE_ROUTINE const Scheduler_Control *_Scheduler_Get_by_CPU(
   return _Scheduler_Get_by_CPU_index( cpu_index );
 }
 
-#if defined(RTEMS_SMP)
 RTEMS_INLINE_ROUTINE Scheduler_Node *_Scheduler_Thread_get_own_node(
   const Thread_Control *the_thread
 )
 {
+#if defined(RTEMS_SMP)
   return the_thread->Scheduler.own_node;
+#else
+  return the_thread->Scheduler.node;
+#endif
 }
 
+#if defined(RTEMS_SMP)
 RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_Node_get_user(
   const Scheduler_Node *node
 )



More information about the vc mailing list