summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/ChangeLog5
-rw-r--r--c/src/lib/libbsp/shared/bootcard.c15
-rw-r--r--c/src/lib/libbsp/shared/main.c2
3 files changed, 15 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/ChangeLog b/c/src/lib/libbsp/ChangeLog
index 8b20585f6f..177c85f52c 100644
--- a/c/src/lib/libbsp/ChangeLog
+++ b/c/src/lib/libbsp/ChangeLog
@@ -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>
* include/rtems/score/Makefile.am: Use 'PREINSTALL_FILES ='.
diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c
index 76e08698a7..9cc2bb73f8 100644
--- a/c/src/lib/libbsp/shared/bootcard.c
+++ b/c/src/lib/libbsp/shared/bootcard.c
@@ -46,7 +46,7 @@ rtems_interrupt_level bsp_isr_level;
* 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)
{
@@ -57,8 +57,10 @@ int boot_card(int argc, char **argv, char **envp)
char **envp_p = &envp_pointer;
/*
- * Set things up so main is called with real pointers for argv and envp.
- * If the BSP has passed us something useful, then pass it on.
+ * Set things up so c_rtems_main() is called with real pointers for
+ * 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 )
@@ -114,14 +116,15 @@ int boot_card(int argc, char **argv, char **envp)
rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table );
/*
- * Call main() and get the global constructors invoked if there
- * are any.
+ * Call c_rtems_main() and eventually let the first task or the real
+ * main() invoke the global constructors if there are any.
*/
+
#ifdef USE_INIT_FINI
atexit( _fini );
#endif
- status = main( argc, argv_p, envp_p );
+ status = c_rtems_main( argc, argv_p, envp_p );
/*
* Perform any BSP specific shutdown actions.
diff --git a/c/src/lib/libbsp/shared/main.c b/c/src/lib/libbsp/shared/main.c
index 9f5beea859..f067cba553 100644
--- a/c/src/lib/libbsp/shared/main.c
+++ b/c/src/lib/libbsp/shared/main.c
@@ -22,7 +22,7 @@ char *rtems_progname;
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])
rtems_progname = argv[0];