PR 1901/cpukit
	* score/src/threadhandler.c: Do not use internal tasks for global
	initialization in MP configuration.
This commit is contained in:
Sebastian Huber
2011-09-09 11:25:23 +00:00
parent fd1661f229
commit 842394f847
2 changed files with 18 additions and 5 deletions

View File

@@ -1,3 +1,9 @@
2011-09-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1901/cpukit
* score/src/threadhandler.c: Do not use internal tasks for global
initialization in MP configuration.
2011-09-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1844/cpukit

View File

@@ -89,8 +89,8 @@ void _Thread_Handler( void )
ISR_Level level;
Thread_Control *executing;
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
@@ -110,8 +110,15 @@ void _Thread_Handler( void )
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
#if defined(RTEMS_MULTIPROCESSING)
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
doneConstructors = true;
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
@@ -143,7 +150,7 @@ void _Thread_Handler( void )
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
if (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
#if defined(RTEMS_SMP)