summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/schedulerimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-15 11:52:00 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-02-25 07:18:35 +0100
commite50e42b820c4163a1c5e07c6697c3102fc2d4740 (patch)
tree845deffec09923b3a284512397298132c3a8f26a /cpukit/include/rtems/score/schedulerimpl.h
parentconfig: CONFIGURE_INIT_TASK_INITIAL_MODES (diff)
downloadrtems-e50e42b820c4163a1c5e07c6697c3102fc2d4740.tar.bz2
score: _Scheduler_Is_non_preempt_mode_supported()
If the non-preempt mode for threads is supported depends on the scheduler implementation. Add _Scheduler_Is_non_preempt_mode_supported() to indicate this. Update #3876.
Diffstat (limited to 'cpukit/include/rtems/score/schedulerimpl.h')
-rw-r--r--cpukit/include/rtems/score/schedulerimpl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/schedulerimpl.h b/cpukit/include/rtems/score/schedulerimpl.h
index dcc81fcbbf..e7fbb8b166 100644
--- a/cpukit/include/rtems/score/schedulerimpl.h
+++ b/cpukit/include/rtems/score/schedulerimpl.h
@@ -130,6 +130,24 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Release_critical(
}
#if defined(RTEMS_SMP)
+/**
+ * @brief Indicate if the thread non-preempt mode is supported by the
+ * scheduler.
+ *
+ * @param scheduler The scheduler instance.
+ *
+ * @return True if the non-preempt mode for threads is supported by the
+ * scheduler, otherwise false.
+ */
+RTEMS_INLINE_ROUTINE bool _Scheduler_Is_non_preempt_mode_supported(
+ const Scheduler_Control *scheduler
+)
+{
+ return scheduler->is_non_preempt_mode_supported;
+}
+#endif
+
+#if defined(RTEMS_SMP)
void _Scheduler_Request_ask_for_help( Thread_Control *the_thread );
/**