2001-09-28 Joel Sherrill <joel@OARcorp.com>

* shared/bootcard.c, shared/main.c: Now call int c_rtems_main()
	not main().
This commit is contained in:
Joel Sherrill
2001-09-28 23:14:58 +00:00
parent 6a6cd55490
commit af536c966a
3 changed files with 15 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
2001-09-28 Joel Sherrill <joel@OARcorp.com>
* shared/bootcard.c, shared/main.c: Now call int c_rtems_main()
not main().
2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* include/rtems/score/Makefile.am: Use 'PREINSTALL_FILES ='. * include/rtems/score/Makefile.am: Use 'PREINSTALL_FILES ='.

View File

@@ -46,7 +46,7 @@ rtems_interrupt_level bsp_isr_level;
* Since there is a forward reference * Since there is a forward reference
*/ */
int main(int argc, char **argv, char **envp); int c_rtems_main(int argc, char **argv, char **envp);
int boot_card(int argc, char **argv, char **envp) int boot_card(int argc, char **argv, char **envp)
{ {
@@ -57,8 +57,10 @@ int boot_card(int argc, char **argv, char **envp)
char **envp_p = &envp_pointer; char **envp_p = &envp_pointer;
/* /*
* Set things up so main is called with real pointers for argv and envp. * Set things up so c_rtems_main() is called with real pointers for
* If the BSP has passed us something useful, then pass it on. * argv and envp. If the BSP has passed us something useful, then
* pass it on. Somehow we need to eventually make this available to
* a real main() in user land. :)
*/ */
if ( argv ) if ( argv )
@@ -114,14 +116,15 @@ int boot_card(int argc, char **argv, char **envp)
rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table ); rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table );
/* /*
* Call main() and get the global constructors invoked if there * Call c_rtems_main() and eventually let the first task or the real
* are any. * main() invoke the global constructors if there are any.
*/ */
#ifdef USE_INIT_FINI #ifdef USE_INIT_FINI
atexit( _fini ); atexit( _fini );
#endif #endif
status = main( argc, argv_p, envp_p ); status = c_rtems_main( argc, argv_p, envp_p );
/* /*
* Perform any BSP specific shutdown actions. * Perform any BSP specific shutdown actions.

View File

@@ -22,7 +22,7 @@ char *rtems_progname;
extern rtems_interrupt_level bsp_isr_level; extern rtems_interrupt_level bsp_isr_level;
int main(int argc, char **argv) int c_rtems_main(int argc, char **argv)
{ {
if ((argc > 0) && argv && argv[0]) if ((argc > 0) && argv && argv[0])
rtems_progname = argv[0]; rtems_progname = argv[0];