2 Copyright © 1995-2002, 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 ADDHEAD((struct List
*)&__atexit_list
, (struct Node
*)aen
);
20 int __init_atexit(void)
22 NEWLIST((struct List
*)&__atexit_list
);
27 void __exit_atexit(void)
30 struct AtExitNode
*aen
;
32 while ((aen
= (struct AtExitNode
*) REMHEAD(
33 (struct List
*) &__atexit_list
)))
35 switch (aen
->node
.ln_Type
)
42 aen
->func
.fptr(__aros_startup_error
, aen
->ptr
);
49 ADD2INIT(__init_atexit
, 100);
50 ADD2EXIT(__exit_atexit
, 100);