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 D(bug("[__arosc_startup] Start\n"));
23 __arosc_program_startup();
25 struct arosc_userdata
*udata
= __get_arosc_userdata();
27 udata
->acud_startup_error
= __startup_error
;
29 if (setjmp(udata
->acud_startup_jmp_buf
) == 0)
31 D(bug("[__arosc_startup] setjmp() called\n"));
32 __startup_entries_next();
36 D(bug("[__arosc_startup] setjmp() return from longjmp\n"));
37 __startup_error
= udata
->acud_startup_error
;
40 __arosc_program_end();
42 D(bug("[__arosc_startup] Leave\n"));
45 ADD2SET(__arosc_startup
, program_entries
, 0);