2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: autoinit library - arosc.library specific code
9 #include <aros/debug.h>
10 #include <aros/symbolsets.h>
11 #include <aros/startup.h>
13 #include <sys/arosc.h>
15 static void __arosc_startup(void)
17 struct arosc_userdata
*udata
= __get_arosc_userdata();
19 D(bug("[__arosc_startup] Start, base 0x%p, userdata 0x%p\n", aroscbase
, udata
));
21 __arosc_program_startup();
23 D(bug("[__arosc_startup] Library startup called, error %d\n", __startup_error
));
24 udata
->acud_startup_error
= __startup_error
;
26 if (setjmp(udata
->acud_startup_jmp_buf
) == 0)
28 D(bug("[__arosc_startup] setjmp() called\n"));
29 __startup_entries_next();
33 D(bug("[__arosc_startup] setjmp() return from longjmp\n"));
34 __startup_error
= udata
->acud_startup_error
;
37 __arosc_program_end();
39 D(bug("[__arosc_startup] Leave\n"));
42 ADD2SET(__arosc_startup
, program_entries
, 0);