[PATCH] rtems: Fix rtems_task_mode()
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Dec 21 14:03:06 UTC 2017
A rtems_configuration_is_smp_enabled() inside a !defined( RTEMS_SMP)
block makes no sense.
Remove !defined( RTEMS_SMP ) conditions.
Test tm04 works now again.
Update #3000.
---
cpukit/rtems/src/taskmode.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c
index 91b16a565e..f25746e492 100644
--- a/cpukit/rtems/src/taskmode.c
+++ b/cpukit/rtems/src/taskmode.c
@@ -88,18 +88,12 @@ rtems_status_code rtems_task_mode(
* These are generic thread scheduling characteristics.
*/
preempt_enabled = false;
-#if !defined( RTEMS_SMP )
if ( mask & RTEMS_PREEMPT_MASK ) {
- if ( rtems_configuration_is_smp_enabled() &&
- !_Modes_Is_preempt( mode_set ) ) {
- return RTEMS_NOT_IMPLEMENTED;
- }
bool is_preempt_enabled = _Modes_Is_preempt( mode_set );
preempt_enabled = !executing->is_preemptible && is_preempt_enabled;
executing->is_preemptible = is_preempt_enabled;
}
-#endif
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
@@ -113,11 +107,9 @@ rtems_status_code rtems_task_mode(
/*
* Set the new interrupt level
*/
-#if !defined( RTEMS_SMP )
if ( mask & RTEMS_INTERRUPT_MASK ) {
_Modes_Set_interrupt_level( mode_set );
}
-#endif
/*
* This is specific to the RTEMS API
--
2.12.3
More information about the devel
mailing list