From ff32644ed51d74e411be22aa5b10c0526e03fa19 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 14 Sep 2008 21:02:10 +0000 Subject: 2008-09-14 Joel Sherrill * 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. --- c/src/lib/libbsp/h8300/h8sim/startup/__main.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'c/src/lib/libbsp/h8300/h8sim/startup/__main.c') 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) (); - } } -- cgit v1.2.3