2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: autoinit library - arosc.library specific code
8 #include <proto/arosc.h>
10 #include <aros/symbolsets.h>
11 #include <aros/startup.h>
14 #include <aros/debug.h>
16 void __arosc_program_startup(void);
17 void __arosc_program_end(void);
19 static void __arosc_startup(void)
21 struct arosc_userdata
*udata
= __get_arosc_userdata();
23 D(bug("[__arosc_startup] Start, base 0x%p, userdata 0x%p\n", aroscbase
, udata
));
25 __arosc_program_startup();
27 D(bug("[__arosc_startup] Library startup called, error %d\n", __startup_error
));
28 udata
->acud_startup_error
= __startup_error
;
30 if (setjmp(udata
->acud_startup_jmp_buf
) == 0)
32 D(bug("[__arosc_startup] setjmp() called\n"));
33 __startup_entries_next();
37 D(bug("[__arosc_startup] setjmp() return from longjmp\n"));
38 __startup_error
= udata
->acud_startup_error
;
41 __arosc_program_end();
43 D(bug("[__arosc_startup] Leave\n"));
46 ADD2SET(__arosc_startup
, program_entries
, 0);