[rtems commit] rtems: Allow to set ISR level 0 in SMP config

Sebastian Huber sebh at rtems.org
Wed Jan 9 09:37:01 UTC 2019


Module:    rtems
Branch:    master
Commit:    1f2851867535aa24edfd8574b520f1b3ec22efc0
Changeset: http://git.rtems.org/rtems/commit/?id=1f2851867535aa24edfd8574b520f1b3ec22efc0

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jan  8 08:39:42 2019 +0100

rtems: Allow to set ISR level 0 in SMP config

Update #3000.

---

 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 3e7ebe9..1767d7b 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 ae85b2f..dd9b52a 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);




More information about the vc mailing list