[PATCH 2/5] rtems: Allow to set ISR level 0 in SMP config

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jan 8 08:59:32 UTC 2019


---
 cpukit/rtems/src/taskmode.c                 | 1 +
 testsuites/smptests/smpunsupported01/init.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c
index 3e7ebe9d20..1767d7be84 100644
--- a/cpukit/rtems/src/taskmode.c
+++ b/cpukit/rtems/src/taskmode.c
@@ -56,6 +56,7 @@ rtems_status_code rtems_task_mode(
 #if defined(RTEMS_SMP)
   if (
     ( mask & RTEMS_INTERRUPT_MASK ) != 0
+      && _Modes_Get_interrupt_level( mode_set ) != 0
       && rtems_configuration_is_smp_enabled()
   ) {
     return RTEMS_NOT_IMPLEMENTED;
diff --git a/testsuites/smptests/smpunsupported01/init.c b/testsuites/smptests/smpunsupported01/init.c
index ae85b2fc89..dd9b52a3c5 100644
--- a/testsuites/smptests/smpunsupported01/init.c
+++ b/testsuites/smptests/smpunsupported01/init.c
@@ -45,7 +45,7 @@ static void test(void)
   mode = RTEMS_INTERRUPT_LEVEL(0);
   if (mode == 0) {
     sc = rtems_task_mode(mode, RTEMS_INTERRUPT_MASK, &mode);
-    rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
+    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
   }
 
   mode = RTEMS_INTERRUPT_LEVEL(1);
-- 
2.16.4




More information about the devel mailing list