diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-01-08 09:53:26 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-01-09 10:35:33 +0100 |
commit | 3bd3999936cfa8a77a545e513669e61877f9ccb6 (patch) | |
tree | fedf8ff5eb9a41a659f856b88df92e60fc65986a /cpukit | |
parent | rtems: Allow to set ISR level 0 in SMP config (diff) | |
download | rtems-3bd3999936cfa8a77a545e513669e61877f9ccb6.tar.bz2 |
Adjust interrupt mode tests for some CPU ports
In case the robust thread dispatch is enabled by the CPU port, then the
interrupt level must not be changed through the task mode.
Update #3000.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/rtems/src/taskmode.c | 4 | ||||
-rw-r--r-- | cpukit/score/src/threaddispatch.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/threadinitialize.c | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c index 1767d7be84..906f86bdcd 100644 --- a/cpukit/rtems/src/taskmode.c +++ b/cpukit/rtems/src/taskmode.c @@ -53,11 +53,13 @@ rtems_status_code rtems_task_mode( } #endif -#if defined(RTEMS_SMP) +#if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE if ( ( mask & RTEMS_INTERRUPT_MASK ) != 0 && _Modes_Get_interrupt_level( mode_set ) != 0 +#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE && rtems_configuration_is_smp_enabled() +#endif ) { return RTEMS_NOT_IMPLEMENTED; } diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c index b82fe539c1..fc6a172080 100644 --- a/cpukit/score/src/threaddispatch.c +++ b/cpukit/score/src/threaddispatch.c @@ -261,7 +261,7 @@ void _Thread_Do_dispatch( Per_CPU_Control *cpu_self, ISR_Level level ) #if defined(RTEMS_SCORE_ROBUST_THREAD_DISPATCH) if ( !_ISR_Is_enabled( level ) -#if defined(RTEMS_SMP) +#if defined(RTEMS_SMP) && CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE && rtems_configuration_is_smp_enabled() #endif ) { diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 2ad4ccd9ed..e2bb694f18 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -64,10 +64,12 @@ bool _Thread_Initialize( } #endif -#if defined(RTEMS_SMP) +#if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE if ( isr_level != 0 +#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE && rtems_configuration_is_smp_enabled() +#endif ) { return false; } |