update mappings to reflect recent changes
[AROS.git] / compiler / clib / atexit.c
blob6598d9690e43ac17e78c62eb775a8ed7208cfd1a
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "__exitfunc.h"
8 /*****************************************************************************
10 NAME */
11 #include <stdlib.h>
13 int atexit(
15 /* SYNOPSIS */
16 void (*func)(void))
18 /* FUNCTION
19 Registers the given function to be called at normal
20 process termination.
22 INPUTS
23 func - function to be called.
25 RESULT
27 NOTES
29 EXAMPLE
31 BUGS
33 SEE ALSO
34 exit()
36 INTERNALS
38 ******************************************************************************/
40 struct AtExitNode *aen = malloc(sizeof(*aen));
42 if (!aen) return -1;
44 aen->node.ln_Type = AEN_VOID;
45 aen->func.fvoid = func;
47 return __addexitfunc(aen);