[PATCH 1/5] score: SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Sep 17 07:02:55 UTC 2021


Rename SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP in
SCHEDULER_DEFAULT_SMP_OPERATIONS.  Add a Doxygen comment.
---
 cpukit/include/rtems/score/scheduler.h         | 15 +++++++++++++--
 cpukit/include/rtems/score/schedulercbs.h      |  2 +-
 cpukit/include/rtems/score/scheduleredf.h      |  2 +-
 cpukit/include/rtems/score/schedulerpriority.h |  2 +-
 cpukit/include/rtems/score/schedulersimple.h   |  2 +-
 5 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/cpukit/include/rtems/score/scheduler.h b/cpukit/include/rtems/score/scheduler.h
index da1e030ab8..25b6723efd 100644
--- a/cpukit/include/rtems/score/scheduler.h
+++ b/cpukit/include/rtems/score/scheduler.h
@@ -458,8 +458,19 @@ Priority_Control _Scheduler_default_Unmap_priority(
     Scheduler_Node          *node,
     struct Per_CPU_Control  *cpu
   );
+#endif
 
-  #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
+/**
+ * @brief This define provides a set of default implementations for
+ *   SMP-specific scheduler operations.
+ *
+ * The default implementations are intended for uniprocessor schedulers.  SMP
+ * schedulers shall implement the operations properly.
+ *
+ * If SMP support is disabled, the define evaluates to nothing.
+ */
+#if defined(RTEMS_SMP)
+  #define SCHEDULER_DEFAULT_SMP_OPERATIONS \
     _Scheduler_default_Ask_for_help, \
     _Scheduler_default_Reconsider_help_request, \
     _Scheduler_default_Withdraw_node, \
@@ -468,7 +479,7 @@ Priority_Control _Scheduler_default_Unmap_priority(
     NULL, \
     NULL,
 #else
-  #define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP
+  #define SCHEDULER_DEFAULT_SMP_OPERATIONS
 #endif
 
 /**
diff --git a/cpukit/include/rtems/score/schedulercbs.h b/cpukit/include/rtems/score/schedulercbs.h
index e321923c11..396dfc17be 100644
--- a/cpukit/include/rtems/score/schedulercbs.h
+++ b/cpukit/include/rtems/score/schedulercbs.h
@@ -62,7 +62,7 @@ extern "C" {
     _Scheduler_EDF_Update_priority,  /* update priority entry point */ \
     _Scheduler_EDF_Map_priority,     /* map priority entry point */ \
     _Scheduler_EDF_Unmap_priority,   /* unmap priority entry point */ \
-    SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
+    SCHEDULER_DEFAULT_SMP_OPERATIONS \
     _Scheduler_CBS_Node_initialize,  /* node initialize entry point */ \
     _Scheduler_default_Node_destroy, /* node destroy entry point */ \
     _Scheduler_CBS_Release_job,      /* new period of task */ \
diff --git a/cpukit/include/rtems/score/scheduleredf.h b/cpukit/include/rtems/score/scheduleredf.h
index 065b511a14..54b1cd71bc 100644
--- a/cpukit/include/rtems/score/scheduleredf.h
+++ b/cpukit/include/rtems/score/scheduleredf.h
@@ -61,7 +61,7 @@ extern "C" {
     _Scheduler_EDF_Update_priority,  /* update priority entry point */ \
     _Scheduler_EDF_Map_priority,     /* map priority entry point */ \
     _Scheduler_EDF_Unmap_priority,   /* unmap priority entry point */ \
-    SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
+    SCHEDULER_DEFAULT_SMP_OPERATIONS \
     _Scheduler_EDF_Node_initialize,  /* node initialize entry point */ \
     _Scheduler_default_Node_destroy, /* node destroy entry point */ \
     _Scheduler_EDF_Release_job,      /* new period of task */ \
diff --git a/cpukit/include/rtems/score/schedulerpriority.h b/cpukit/include/rtems/score/schedulerpriority.h
index 66b976ef8f..45a312ffaf 100644
--- a/cpukit/include/rtems/score/schedulerpriority.h
+++ b/cpukit/include/rtems/score/schedulerpriority.h
@@ -52,7 +52,7 @@ extern "C" {
     _Scheduler_priority_Update_priority,  /* update priority entry point */ \
     _Scheduler_default_Map_priority,      /* map priority entry point */ \
     _Scheduler_default_Unmap_priority,    /* unmap priority entry point */ \
-    SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
+    SCHEDULER_DEFAULT_SMP_OPERATIONS \
     _Scheduler_priority_Node_initialize,  /* node initialize entry point */ \
     _Scheduler_default_Node_destroy,      /* node destroy entry point */ \
     _Scheduler_default_Release_job,       /* new period of task */ \
diff --git a/cpukit/include/rtems/score/schedulersimple.h b/cpukit/include/rtems/score/schedulersimple.h
index e201890f21..155027f3d3 100644
--- a/cpukit/include/rtems/score/schedulersimple.h
+++ b/cpukit/include/rtems/score/schedulersimple.h
@@ -51,7 +51,7 @@ extern "C" {
     _Scheduler_simple_Update_priority,    /* update priority entry point */ \
     _Scheduler_default_Map_priority,      /* map priority entry point */ \
     _Scheduler_default_Unmap_priority,    /* unmap priority entry point */ \
-    SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
+    SCHEDULER_DEFAULT_SMP_OPERATIONS \
     _Scheduler_default_Node_initialize,   /* node initialize entry point */ \
     _Scheduler_default_Node_destroy,      /* node destroy entry point */ \
     _Scheduler_default_Release_job,       /* new period of task */ \
-- 
2.31.1



More information about the devel mailing list