[rtems commit] score: Move out of __RTEMS_HAVE_SYS_CPUSET_H__
Sebastian Huber
sebh at rtems.org
Mon May 12 13:50:42 UTC 2014
Module: rtems
Branch: master
Commit: 390e73c4eea85f613a918e8fa3988ccc877726ac
Changeset: http://git.rtems.org/rtems/commit/?id=390e73c4eea85f613a918e8fa3988ccc877726ac
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon May 12 15:55:25 2014 +0200
score: Move out of __RTEMS_HAVE_SYS_CPUSET_H__
Move _Scheduler_Get() and _Scheduler_Set() out of the #if
defined(__RTEMS_HAVE_SYS_CPUSET_H__) block.
---
cpukit/score/include/rtems/score/schedulerimpl.h | 68 +++++++++++-----------
1 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index cb73d5e..74fa403 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -330,6 +330,40 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_Has_processor_ownership(
#endif
}
+RTEMS_INLINE_ROUTINE const Scheduler_Control *_Scheduler_Get(
+ Thread_Control *the_thread
+)
+{
+#if defined(RTEMS_SMP)
+ return the_thread->scheduler;
+#else
+ (void) the_thread;
+
+ return &_Scheduler_Table[ 0 ];
+#endif
+}
+
+RTEMS_INLINE_ROUTINE void _Scheduler_Set(
+ const Scheduler_Control *scheduler,
+ Thread_Control *the_thread
+)
+{
+#if defined(RTEMS_SMP)
+ const Scheduler_Control *current_scheduler = _Scheduler_Get( the_thread );
+
+ if ( current_scheduler != scheduler ) {
+ _Thread_Set_state( the_thread, STATES_MIGRATING );
+ _Scheduler_Free( _Scheduler_Get( the_thread ), the_thread );
+ the_thread->scheduler = scheduler;
+ _Scheduler_Allocate( scheduler, the_thread );
+ _Scheduler_Update( scheduler, the_thread );
+ _Thread_Clear_state( the_thread, STATES_MIGRATING );
+ }
+#else
+ (void) scheduler;
+#endif
+}
+
#if defined(__RTEMS_HAVE_SYS_CPUSET_H__)
RTEMS_INLINE_ROUTINE void _Scheduler_Get_processor_set(
@@ -377,40 +411,6 @@ bool _Scheduler_Get_affinity(
cpu_set_t *cpuset
);
-RTEMS_INLINE_ROUTINE const Scheduler_Control *_Scheduler_Get(
- Thread_Control *the_thread
-)
-{
-#if defined(RTEMS_SMP)
- return the_thread->scheduler;
-#else
- (void) the_thread;
-
- return &_Scheduler_Table[ 0 ];
-#endif
-}
-
-RTEMS_INLINE_ROUTINE void _Scheduler_Set(
- const Scheduler_Control *scheduler,
- Thread_Control *the_thread
-)
-{
-#if defined(RTEMS_SMP)
- const Scheduler_Control *current_scheduler = _Scheduler_Get( the_thread );
-
- if ( current_scheduler != scheduler ) {
- _Thread_Set_state( the_thread, STATES_MIGRATING );
- _Scheduler_Free( _Scheduler_Get( the_thread ), the_thread );
- the_thread->scheduler = scheduler;
- _Scheduler_Allocate( scheduler, the_thread );
- _Scheduler_Update( scheduler, the_thread );
- _Thread_Clear_state( the_thread, STATES_MIGRATING );
- }
-#else
- (void) scheduler;
-#endif
-}
-
RTEMS_INLINE_ROUTINE bool _Scheduler_default_Set_affinity_body(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
More information about the vc
mailing list