linux/bootstrap: use Forbid/Permit only when thread is main AROS thread
[AROS.git] / compiler / stdc / stdc_startup.c
blobbfc7f9ea275a53a66bab6c80644874150b7dad9c
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
7 #include <aros/symbolsets.h>
8 #include <aros/startup.h>
10 #include "__stdc_intbase.h"
12 static void __stdc_startup(struct ExecBase *SysBase)
14 jmp_buf exitjmp;
16 if (setjmp(exitjmp) == 0)
18 D(bug("[__stdc_startup] setjmp() called\n"));
20 /* Tell stdc.library a program using it has started */
21 __stdc_program_startup(exitjmp, (int *)&__startup_error);
22 D(bug("[__stdc_startup] Library startup called\n"));
24 __startup_entries_next();
26 else
28 D(bug("[__stdc_startup] setjmp() return from longjmp\n"));
31 /* Tell stdc.library program has reached the end */
32 __stdc_program_end();
34 D(bug("[__stdc_startup] Leave\n"));
37 ADD2SET(__stdc_startup, PROGRAM_ENTRIES, 0);