summaryrefslogtreecommitdiffstats
path: root/cpukit/score
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/score
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/score')
-rw-r--r--cpukit/score/src/threadinitialize.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index 976c97701a..5145bcfdd8 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -63,7 +63,10 @@ bool _Thread_Initialize(
the_thread->Start.allocated_stack = config->allocated_stack;
#if defined(RTEMS_SMP)
- if ( !config->is_preemptible && rtems_configuration_is_smp_enabled() ) {
+ if (
+ !config->is_preemptible
+ && !_Scheduler_Is_non_preempt_mode_supported( config->scheduler )
+ ) {
goto failed;
}
#endif