diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-22 15:30:59 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-22 15:30:59 +0000 |
commit | af043e131986fd807f7aee59584a85cc4a29cd3a (patch) | |
tree | d738ece2c5211660f506e45ede43510cca4ad236 /c/src/lib/libbsp/shared | |
parent | 2008-01-22 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-af043e131986fd807f7aee59584a85cc4a29cd3a.tar.bz2 |
2008-01-22 Joel Sherrill <joel.sherrill@OARcorp.com>
* bootcard.c: Improve comments and clean up argc/argv order.
Diffstat (limited to 'c/src/lib/libbsp/shared')
-rw-r--r-- | c/src/lib/libbsp/shared/ChangeLog | 4 | ||||
-rw-r--r-- | c/src/lib/libbsp/shared/bootcard.c | 28 |
2 files changed, 20 insertions, 12 deletions
diff --git a/c/src/lib/libbsp/shared/ChangeLog b/c/src/lib/libbsp/shared/ChangeLog index 18179196dd..7315cf28a4 100644 --- a/c/src/lib/libbsp/shared/ChangeLog +++ b/c/src/lib/libbsp/shared/ChangeLog @@ -1,3 +1,7 @@ +2008-01-22 Joel Sherrill <joel.sherrill@OARcorp.com> + + * bootcard.c: Improve comments and clean up argc/argv order. + 2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> * bootcard.c, bsplibc.c: Eliminate copies of the Configuration Table. diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c index b36e026f1d..9e4c29adab 100644 --- a/c/src/lib/libbsp/shared/bootcard.c +++ b/c/src/lib/libbsp/shared/bootcard.c @@ -16,12 +16,12 @@ * + back to here eventually * + bspclean.c: bsp_cleanup * - * This style of initialization insures that the C++ global + * This style of initialization ensures that the C++ global * constructors are executed after RTEMS is initialized. + * Thanks to Chris Johns <cjohns@plessey.com.au> for the idea + * to move C++ global constructors into the first task. * - * Thanks to Chris Johns <cjohns@plessey.com.au> for this idea. - * - * COPYRIGHT (c) 1989-2006. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -70,6 +70,15 @@ int boot_card(int argc, char **argv, char **envp) envp_p = envp; /* + * Set the program name in case some application cares. + */ + + if ((argc > 0) && argv && argv[0]) + rtems_progname = argv[0]; + else + rtems_progname = "RTEMS"; + + /* * Invoke Board Support Package initialization routine written in C. */ @@ -82,15 +91,10 @@ int boot_card(int argc, char **argv, char **envp) rtems_initialize_executive_early( &Configuration ); /* - * Call c_rtems_main() and eventually let the first task or the real - * main() invoke the global constructors if there are any. + * Complete initialization of RTEMS and switch to the first task. + * Global C++ constructors will be executed in the context of that task. */ - if ((argc > 0) && argv && argv[0]) - rtems_progname = argv[0]; - else - rtems_progname = "RTEMS"; - rtems_initialize_executive_late( bsp_isr_level ); /*************************************************************** @@ -101,7 +105,7 @@ int boot_card(int argc, char **argv, char **envp) */ /* - * Perform any BSP specific shutdown actions. + * Perform any BSP specific shutdown actions which are written in C. */ bsp_cleanup(); |