[rtems commit] score: Workaround for #2751

Sebastian Huber sebh at rtems.org
Fri Jul 1 09:58:39 UTC 2016


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jul  1 09:44:48 2016 +0200

score: Workaround for #2751

The ARM and PowerPC interrupt epilogues call _Thread_Dispatch() with
interrupts disabled (counter example: SPARC).

On SMP configurations, since inter-processor interrupts set the thread
dispatch necessary indicator this prevents a thread dispatch
notification in post-switch handlers (which all run with interrupts
disabled).

On all configurations, this is a serious issue for the interrupt
latency.

Update #2751

---

 cpukit/score/src/threadrestart.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index 21e260b..32ecfba 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -357,6 +357,10 @@ void _Thread_Life_action_handler(
 
     _Thread_Make_zombie( executing );
 
+    /* FIXME: Workaround for https://devel.rtems.org/ticket/2751 */
+    cpu_self->dispatch_necessary = true;
+
+    _Assert( cpu_self->heir != executing );
     _Thread_Dispatch_enable( cpu_self );
     RTEMS_UNREACHABLE();
   }



More information about the vc mailing list