rom/exec/restoretaskstorage.c: Don't restore ETask data
[AROS.git] / compiler / clib / __arosc_startup.c
blobdc61ce03c7507a5bbada3d498d3e5f792ba4c335
1 /*
2 Copyright © 2009-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: arosc library - support code for entering and leaving a program
6 Lang: english
7 */
8 #include "__arosc_privdata.h"
9 #include "__exitfunc.h"
11 #define DEBUG 0
12 #include <aros/debug.h>
14 #include <dos/stdio.h>
15 #include <proto/dos.h>
17 void __arosc_program_startup(void)
19 struct Process *me = (struct Process *)FindTask(NULL);
21 D(bug("[__arosc_program_startup] aroscbase 0x%p\n", __GM_GetBase()));
23 /* Function is just a placeholder for the future */
25 /* A some C error IO routines evidently rely on this, and
26 * should be fixed!
28 if (me->pr_Task.tc_Node.ln_Type == NT_PROCESS &&
29 me->pr_CES != BNULL)
31 SetVBuf(me->pr_CES, NULL, BUF_NONE, -1);
35 void __arosc_program_end(void)
37 struct aroscbase *aroscbase = __GM_GetBase();
38 D(bug("[__arosc_program_end]\n"));
40 if (!(aroscbase->acb_flags & ABNORMAL_EXIT))
41 __callexitfuncs();