diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-14 21:02:10 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-09-14 21:02:10 +0000 |
commit | ff32644ed51d74e411be22aa5b10c0526e03fa19 (patch) | |
tree | 88f61845da1a894ac0fd573e71a8f66c8ffa33d9 /c/src/lib/libbsp/h8300/h8sim/startup/__main.c | |
parent | 2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-ff32644ed51d74e411be22aa5b10c0526e03fa19.tar.bz2 |
2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/__main.c, startup/bspstart.c:
Split out bsp_get_work_area() into its own file and user BSP
Framework to perform more initialization.
* startup/bspgetworkarea.c: New file.
Diffstat (limited to 'c/src/lib/libbsp/h8300/h8sim/startup/__main.c')
-rw-r--r-- | c/src/lib/libbsp/h8300/h8sim/startup/__main.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/h8300/h8sim/startup/__main.c b/c/src/lib/libbsp/h8300/h8sim/startup/__main.c index fcc2432d12..17a58c9a5f 100644 --- a/c/src/lib/libbsp/h8300/h8sim/startup/__main.c +++ b/c/src/lib/libbsp/h8300/h8sim/startup/__main.c @@ -4,19 +4,20 @@ * $Id$ */ +typedef void (*pfunc) (void); +extern pfunc __ctors[]; +extern pfunc __ctors_end[]; + void __main (void) { static int initialized; - if (! initialized) - { - typedef void (*pfunc) (void); - extern pfunc __ctors[]; - extern pfunc __ctors_end[]; - pfunc *p; + pfunc *p; + + if (initialized) + return; - initialized = 1; - for (p = __ctors_end; p > __ctors; ) - (*--p) (); + initialized = 1; + for (p = __ctors_end; p > __ctors; ) + (*--p) (); - } } |