C++ static constructors and SMP

Chris Johns chrisj at rtems.org
Sun Oct 20 21:49:08 UTC 2013

On 20/10/13 1:21 PM, Gedare Bloom wrote:
> Have a pint for me.
Will do. Joel has been showing off his new Android Shoe phone today. 
Very impressive.
> I assumed the c/c++ runtime initialization ran serially with other 
> bootstrap/initialization on the bootup core. Guess I have not looked 
> closely enough! I would think rtems initialization should "finish" 
> before the application starts? Otherwise lots of badness could happen...
I agree. The bug is in threadhandler.c and the code to detect 'doCons'. 
The first core should take the lock and call the init and all other 
cores should spin waiting until it has finished. The current code 
detects if it needs to make the call.

Currently the user has no control over the secondary cores entering 
multitasking. I am undecided if this is a good idea. I wonder if this 
should be a user call and not something that automatically happens so 
the system runs with a single core until the user flicks the switch. In 
the current model the users is multicore mode from the start.


More information about the devel mailing list