[rtems commit] score: Initialize per-CPU locks

Sebastian Huber sebh at rtems.org
Wed Feb 19 08:52:43 UTC 2014


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb 18 13:20:08 2014 +0100

score: Initialize per-CPU locks

---

 cpukit/score/src/smp.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index bfd77dc..5e098e6 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -34,6 +34,12 @@ void _SMP_Handler_initialize( void )
   uint32_t max_cpus = rtems_configuration_get_maximum_processors();
   uint32_t cpu;
 
+  for ( cpu = 0 ; cpu < max_cpus; ++cpu ) {
+    Per_CPU_Control *per_cpu = _Per_CPU_Get_by_index( cpu );
+
+    _ISR_lock_Initialize( &per_cpu->lock );
+  }
+
   /*
    * Discover and initialize the secondary cores in an SMP system.
    */




More information about the vc mailing list