forked from Imagelibrary/rtems
2001-11-20 Joel Sherrill <joel@OARcorp.com>
* src/threadhandler.c: When __USE__MAIN__ is defined by the toolset, invoke the global constructors via __main. Reported as tested by Alexandra Kossovsky <sasha@oktet.ru> and Victor V. Vengerov <vvv@oktet.ru> in conjunction with a new set of tool RPMs (gcc2.95.3newlib1.9.0-3). This was tracked as GNATS PR tools/84.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2001-11-20 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/threadhandler.c: When __USE__MAIN__ is defined by the toolset,
|
||||||
|
invoke the global constructors via __main. Reported as tested by
|
||||||
|
Alexandra Kossovsky <sasha@oktet.ru> and Victor V. Vengerov
|
||||||
|
<vvv@oktet.ru> in conjunction with a new set of tool RPMs
|
||||||
|
(gcc2.95.3newlib1.9.0-3). This was tracked as GNATS PR tools/84.
|
||||||
|
|
||||||
2001-11-07 Joel Sherrill <joel@OARcorp.com>
|
2001-11-07 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
Reported by Todor.Todorov@barco.com and tracked as PR36.
|
Reported by Todor.Todorov@barco.com and tracked as PR36.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void _Thread_Handler( void )
|
|||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
Thread_Control *executing;
|
Thread_Control *executing;
|
||||||
#if defined(__USE_INIT_FINI__)
|
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
|
||||||
static char doneConstructors;
|
static char doneConstructors;
|
||||||
char doneCons;
|
char doneCons;
|
||||||
#endif
|
#endif
|
||||||
@@ -73,7 +73,7 @@ void _Thread_Handler( void )
|
|||||||
level = executing->Start.isr_level;
|
level = executing->Start.isr_level;
|
||||||
_ISR_Set_level(level);
|
_ISR_Set_level(level);
|
||||||
|
|
||||||
#if defined(__USE_INIT_FINI__)
|
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
|
||||||
doneCons = doneConstructors;
|
doneCons = doneConstructors;
|
||||||
doneConstructors = 1;
|
doneConstructors = 1;
|
||||||
#endif
|
#endif
|
||||||
@@ -95,6 +95,11 @@ void _Thread_Handler( void )
|
|||||||
if (!doneCons)
|
if (!doneCons)
|
||||||
_init ();
|
_init ();
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__USE__MAIN__)
|
||||||
|
if (!doneCons)
|
||||||
|
__main ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
switch ( executing->Start.prototype ) {
|
switch ( executing->Start.prototype ) {
|
||||||
case THREAD_START_NUMERIC:
|
case THREAD_START_NUMERIC:
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2001-11-20 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* src/threadhandler.c: When __USE__MAIN__ is defined by the toolset,
|
||||||
|
invoke the global constructors via __main. Reported as tested by
|
||||||
|
Alexandra Kossovsky <sasha@oktet.ru> and Victor V. Vengerov
|
||||||
|
<vvv@oktet.ru> in conjunction with a new set of tool RPMs
|
||||||
|
(gcc2.95.3newlib1.9.0-3). This was tracked as GNATS PR tools/84.
|
||||||
|
|
||||||
2001-11-07 Joel Sherrill <joel@OARcorp.com>
|
2001-11-07 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
Reported by Todor.Todorov@barco.com and tracked as PR36.
|
Reported by Todor.Todorov@barco.com and tracked as PR36.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ void _Thread_Handler( void )
|
|||||||
{
|
{
|
||||||
ISR_Level level;
|
ISR_Level level;
|
||||||
Thread_Control *executing;
|
Thread_Control *executing;
|
||||||
#if defined(__USE_INIT_FINI__)
|
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
|
||||||
static char doneConstructors;
|
static char doneConstructors;
|
||||||
char doneCons;
|
char doneCons;
|
||||||
#endif
|
#endif
|
||||||
@@ -73,7 +73,7 @@ void _Thread_Handler( void )
|
|||||||
level = executing->Start.isr_level;
|
level = executing->Start.isr_level;
|
||||||
_ISR_Set_level(level);
|
_ISR_Set_level(level);
|
||||||
|
|
||||||
#if defined(__USE_INIT_FINI__)
|
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
|
||||||
doneCons = doneConstructors;
|
doneCons = doneConstructors;
|
||||||
doneConstructors = 1;
|
doneConstructors = 1;
|
||||||
#endif
|
#endif
|
||||||
@@ -95,6 +95,11 @@ void _Thread_Handler( void )
|
|||||||
if (!doneCons)
|
if (!doneCons)
|
||||||
_init ();
|
_init ();
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__USE__MAIN__)
|
||||||
|
if (!doneCons)
|
||||||
|
__main ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
switch ( executing->Start.prototype ) {
|
switch ( executing->Start.prototype ) {
|
||||||
case THREAD_START_NUMERIC:
|
case THREAD_START_NUMERIC:
|
||||||
|
|||||||
Reference in New Issue
Block a user