2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 #include "__arosc_privdata.h"
8 #include <aros/symbolsets.h>
9 #include <aros/startup.h>
10 #include <exec/lists.h>
11 #include "__exitfunc.h"
13 int __addexitfunc(struct AtExitNode
*aen
)
15 struct aroscbase
*aroscbase
= __get_aroscbase();
17 ADDHEAD((struct List
*)&aroscbase
->acb_atexit_list
, (struct Node
*)aen
);
22 int __init_atexit(struct aroscbase
*aroscbase
)
24 NEWLIST((struct List
*)&aroscbase
->acb_atexit_list
);
29 void __callexitfuncs(void)
31 struct aroscbase
*aroscbase
= __get_aroscbase();
32 struct AtExitNode
*aen
;
35 (aen
= (struct AtExitNode
*) REMHEAD((struct List
*) &aroscbase
->acb_atexit_list
))
38 switch (aen
->node
.ln_Type
)
45 aen
->func
.fptr(__arosc_startup_error
, aen
->ptr
);
51 ADD2OPENLIB(__init_atexit
, 100);