summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/scheduler.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-17 08:12:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-21 07:39:09 +0200
commit0036ddf1f6263c3d352645f4d3a9afe4ba388bb2 (patch)
tree12ca0a7b11829ad7868f41622461607930550bda /cpukit/include/rtems/score/scheduler.h
parentscore: SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY (diff)
downloadrtems-0036ddf1f6263c3d352645f4d3a9afe4ba388bb2.tar.bz2
score: Provide two thread pin/unpin defaults
The uniprocessor schedulers do not support systems with more than more processors. So they rivially support thread pinning and thus the SMP_FATAL_SCHEDULER_PIN_OR_UNPIN_NOT_SUPPORTED cannot happen. Add a second default implementation for SMP schedulers which do not support thread pinning. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
Diffstat (limited to 'cpukit/include/rtems/score/scheduler.h')
-rw-r--r--cpukit/include/rtems/score/scheduler.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/cpukit/include/rtems/score/scheduler.h b/cpukit/include/rtems/score/scheduler.h
index 6cb07c4ff1..36fc1fd39c 100644
--- a/cpukit/include/rtems/score/scheduler.h
+++ b/cpukit/include/rtems/score/scheduler.h
@@ -444,15 +444,36 @@ Priority_Control _Scheduler_default_Unmap_priority(
);
/**
+ * @brief Does nothing.
+ *
+ * This default implementation for the thread pin or unpin operations should
+ * be used by uniprocessor schedulers if SMP support is enabled.
+ *
+ * @param scheduler This parameter is unused.
+ * @param the_thread This parameter is unused.
+ * @param node This parameter is unused.
+ * @param cpu This parameter is unused.
+ */
+ void _Scheduler_default_Pin_or_unpin_do_nothing(
+ const Scheduler_Control *scheduler,
+ Thread_Control *the_thread,
+ Scheduler_Node *node,
+ struct Per_CPU_Control *cpu
+ );
+
+ /**
* @brief Does nothing in a single processor system, otherwise a fatal error
* is issued.
*
+ * This default implementation for the thread pin or unpin operations should
+ * be used by SMP schedulers which do not support thread pinning.
+ *
* @param scheduler This parameter is unused.
* @param the_thread This parameter is unused.
* @param node This parameter is unused.
* @param cpu This parameter is unused.
*/
- void _Scheduler_default_Pin_or_unpin(
+ void _Scheduler_default_Pin_or_unpin_not_supported(
const Scheduler_Control *scheduler,
Thread_Control *the_thread,
Scheduler_Node *node,
@@ -474,8 +495,8 @@ Priority_Control _Scheduler_default_Unmap_priority(
_Scheduler_default_Ask_for_help, \
_Scheduler_default_Reconsider_help_request, \
_Scheduler_default_Withdraw_node, \
- _Scheduler_default_Pin_or_unpin, \
- _Scheduler_default_Pin_or_unpin, \
+ _Scheduler_default_Pin_or_unpin_do_nothing, \
+ _Scheduler_default_Pin_or_unpin_do_nothing, \
NULL, \
NULL,
#else