[rtems commit] bsps/cache: Optimize smp_cache_broadcast()

Sebastian Huber sebh at rtems.org
Thu Jul 29 07:18:38 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jul 29 09:14:33 2021 +0200

bsps/cache: Optimize smp_cache_broadcast()

Directly call the handler on the executing processor instead of doing this
indirectly via a per-CPU job.

---

 bsps/shared/cache/cacheimpl.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bsps/shared/cache/cacheimpl.h b/bsps/shared/cache/cacheimpl.h
index 3fceaba..16fe59d 100644
--- a/bsps/shared/cache/cacheimpl.h
+++ b/bsps/shared/cache/cacheimpl.h
@@ -299,7 +299,8 @@ static void smp_cache_broadcast( SMP_Action_handler handler, void *arg )
     cpu_self = _Per_CPU_Get();
   }
 
-  _SMP_Broadcast_action( handler, arg );
+  ( *handler )( arg );
+  _SMP_Othercast_action( handler, arg );
 
   if ( isr_level == 0 ) {
     _Thread_Dispatch_enable( cpu_self );



More information about the vc mailing list