[rtems commit] score: Use default get/set affinity operation

Sebastian Huber sebh at rtems.org
Fri Jun 20 10:34:23 UTC 2014


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jun 20 12:05:23 2014 +0200

score: Use default get/set affinity operation

Add and use SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY.

---

 cpukit/score/include/rtems/score/scheduler.h       |    6 ++++++
 cpukit/score/include/rtems/score/schedulercbs.h    |    1 +
 cpukit/score/include/rtems/score/scheduleredf.h    |    1 +
 .../score/include/rtems/score/schedulerpriority.h  |   12 ++----------
 .../include/rtems/score/schedulerprioritysmp.h     |    5 ++---
 cpukit/score/include/rtems/score/schedulersimple.h |    1 +
 .../score/include/rtems/score/schedulersimplesmp.h |    5 ++---
 7 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index 542e4ae..5be2c98 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -365,6 +365,12 @@ void _Scheduler_default_Start_idle(
     size_t                   cpusetsize,
     const cpu_set_t         *cpuset
   );
+
+  #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
+    , _Scheduler_default_Get_affinity \
+    , _Scheduler_default_Set_affinity
+#else
+  #define SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY
 #endif
 
 /**
diff --git a/cpukit/score/include/rtems/score/schedulercbs.h b/cpukit/score/include/rtems/score/schedulercbs.h
index 473d6fe..3b59301 100644
--- a/cpukit/score/include/rtems/score/schedulercbs.h
+++ b/cpukit/score/include/rtems/score/schedulercbs.h
@@ -60,6 +60,7 @@ extern "C" {
     _Scheduler_CBS_Release_job,      /* new period of task */ \
     _Scheduler_default_Tick,         /* tick entry point */ \
     _Scheduler_default_Start_idle    /* start idle entry point */ \
+    SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
   }
 
 /* Return values for CBS server. */
diff --git a/cpukit/score/include/rtems/score/scheduleredf.h b/cpukit/score/include/rtems/score/scheduleredf.h
index 7a20b5b..6d759f5 100644
--- a/cpukit/score/include/rtems/score/scheduleredf.h
+++ b/cpukit/score/include/rtems/score/scheduleredf.h
@@ -53,6 +53,7 @@ extern "C" {
     _Scheduler_EDF_Release_job,      /* new period of task */ \
     _Scheduler_default_Tick,         /* tick entry point */ \
     _Scheduler_default_Start_idle    /* start idle entry point */ \
+    SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
   }
 
 /**
diff --git a/cpukit/score/include/rtems/score/schedulerpriority.h b/cpukit/score/include/rtems/score/schedulerpriority.h
index 2e4f3ab..e412bab 100644
--- a/cpukit/score/include/rtems/score/schedulerpriority.h
+++ b/cpukit/score/include/rtems/score/schedulerpriority.h
@@ -34,14 +34,6 @@ extern "C" {
  */
 /**@{*/
 
-#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
-  #define SCHEDULER_PRIORITY_ADDITIONAL_SMP_ENTRY_POINTS \
-    _Scheduler_default_Get_affinity,     /* get affinity entry point */ \
-    _Scheduler_default_Set_affinity      /* set affinity entry point */
-#else
-  #define SCHEDULER_PRIORITY_ADDITIONAL_SMP_ENTRY_POINTS
-#endif
-
 /**
  *  Entry points for the Deterministic Priority Based Scheduler.
  */
@@ -59,8 +51,8 @@ extern "C" {
     _Scheduler_priority_Priority_compare, /* compares two priorities */ \
     _Scheduler_default_Release_job,       /* new period of task */ \
     _Scheduler_default_Tick,              /* tick entry point */ \
-    _Scheduler_default_Start_idle,        /* start idle entry point */ \
-    SCHEDULER_PRIORITY_ADDITIONAL_SMP_ENTRY_POINTS \
+    _Scheduler_default_Start_idle         /* start idle entry point */ \
+    SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
   }
 
 typedef struct {
diff --git a/cpukit/score/include/rtems/score/schedulerprioritysmp.h b/cpukit/score/include/rtems/score/schedulerprioritysmp.h
index cbb8a58..e922c2b 100644
--- a/cpukit/score/include/rtems/score/schedulerprioritysmp.h
+++ b/cpukit/score/include/rtems/score/schedulerprioritysmp.h
@@ -90,9 +90,8 @@ typedef struct {
     _Scheduler_priority_Priority_compare, \
     _Scheduler_default_Release_job, \
     _Scheduler_default_Tick, \
-    _Scheduler_SMP_Start_idle, \
-    _Scheduler_default_Get_affinity, \
-    _Scheduler_default_Set_affinity \
+    _Scheduler_SMP_Start_idle \
+    SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
   }
 
 void _Scheduler_priority_SMP_Initialize( const Scheduler_Control *scheduler );
diff --git a/cpukit/score/include/rtems/score/schedulersimple.h b/cpukit/score/include/rtems/score/schedulersimple.h
index 68ed527..ef60613 100644
--- a/cpukit/score/include/rtems/score/schedulersimple.h
+++ b/cpukit/score/include/rtems/score/schedulersimple.h
@@ -50,6 +50,7 @@ extern "C" {
     _Scheduler_default_Release_job,       /* new period of task */ \
     _Scheduler_default_Tick,              /* tick entry point */ \
     _Scheduler_default_Start_idle         /* start idle entry point */ \
+    SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
   }
 
 /**
diff --git a/cpukit/score/include/rtems/score/schedulersimplesmp.h b/cpukit/score/include/rtems/score/schedulersimplesmp.h
index c0195e0..29c1b3a 100644
--- a/cpukit/score/include/rtems/score/schedulersimplesmp.h
+++ b/cpukit/score/include/rtems/score/schedulersimplesmp.h
@@ -71,9 +71,8 @@ typedef struct {
     _Scheduler_priority_Priority_compare, \
     _Scheduler_default_Release_job, \
     _Scheduler_default_Tick, \
-    _Scheduler_SMP_Start_idle, \
-    _Scheduler_default_Get_affinity, \
-    _Scheduler_default_Set_affinity \
+    _Scheduler_SMP_Start_idle \
+    SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
   }
 
 void _Scheduler_simple_SMP_Initialize( const Scheduler_Control *scheduler );



More information about the vc mailing list