[rtems commit] score: Fix ISR enable in _Thread_Dispatch_enable()

Sebastian Huber sebh at rtems.org
Mon Aug 20 06:37:17 UTC 2018


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Aug 10 07:22:43 2018 +0200

score: Fix ISR enable in _Thread_Dispatch_enable()

This bug had probably no effect since the interrupt enable is idempotent
on all CPU ports.

Close #3496.

---

 cpukit/include/rtems/score/threaddispatch.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cpukit/include/rtems/score/threaddispatch.h b/cpukit/include/rtems/score/threaddispatch.h
index 63eb4c6..69696f4 100644
--- a/cpukit/include/rtems/score/threaddispatch.h
+++ b/cpukit/include/rtems/score/threaddispatch.h
@@ -228,9 +228,8 @@ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_enable( Per_CPU_Control *cpu_self )
     } else {
       cpu_self->thread_dispatch_disable_level = 0;
       _Profiling_Thread_dispatch_enable( cpu_self, 0 );
+      _ISR_Local_enable( level );
     }
-
-    _ISR_Local_enable( level );
   } else {
     _Assert( disable_level > 0 );
     cpu_self->thread_dispatch_disable_level = disable_level - 1;



More information about the vc mailing list