[rtems commit] score: _SMP_Inter_processor_interrupt_handler()

Sebastian Huber sebh at rtems.org
Wed Jul 25 08:10:08 UTC 2018


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 24 09:09:06 2018 +0200

score: _SMP_Inter_processor_interrupt_handler()

Optimize _SMP_Inter_processor_interrupt_handler() for the common case in
which the inter-processor interrupt is only used to trigger a thread
dispatch.

---

 cpukit/include/rtems/score/smpimpl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/score/smpimpl.h b/cpukit/include/rtems/score/smpimpl.h
index 762b3e5..75d36ac 100644
--- a/cpukit/include/rtems/score/smpimpl.h
+++ b/cpukit/include/rtems/score/smpimpl.h
@@ -186,7 +186,7 @@ static inline long unsigned _SMP_Inter_processor_interrupt_handler(
     ATOMIC_ORDER_ACQUIRE
   );
 
-  if ( message != 0 ) {
+  if ( RTEMS_PREDICT_FALSE( message != 0 ) ) {
     if ( ( message & SMP_MESSAGE_SHUTDOWN ) != 0 ) {
       _SMP_Fatal( SMP_FATAL_SHUTDOWN_RESPONSE );
       /* does not continue past here */



More information about the vc mailing list