[rtems commit] rtems: Fix rtems_task_mode()
Sebastian Huber
sebh at rtems.org
Fri Jan 19 06:46:26 UTC 2018
Module: rtems
Branch: master
Commit: a5b4db4bc250a1beb06da16b3003ae1608c611d4
Changeset: http://git.rtems.org/rtems/commit/?id=a5b4db4bc250a1beb06da16b3003ae1608c611d4
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Dec 21 14:59:54 2017 +0100
rtems: Fix rtems_task_mode()
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 91b16a5..f25746e 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
More information about the vc
mailing list