[PATCH 16/25] rtems: Fix rtems_task_mode() for SMP

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 18 14:26:04 UTC 2013


On SMP the non-preempt mode is not supported, thus we can simplify the
signal delivery path and avoid an processor index usage problem.
---
 cpukit/rtems/src/taskmode.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c
index eb3636d..0d8035d 100644
--- a/cpukit/rtems/src/taskmode.c
+++ b/cpukit/rtems/src/taskmode.c
@@ -111,7 +111,13 @@ rtems_status_code rtems_task_mode(
     }
   }
 
+#if defined( RTEMS_SMP )
+  if ( needs_asr_dispatching ) {
+    _Thread_Dispatch();
+  }
+#else
   _Thread_Dispatch_if_necessary( executing, needs_asr_dispatching );
+#endif
 
   return RTEMS_SUCCESSFUL;
 }
-- 
1.7.7




More information about the devel mailing list