Updated PCI IDs to latest snapshot.
[tangerine.git] / compiler / clib / on_exit.c
blobf436c08dbf3473b5cbadbdf1782e37f5cca57a8f
1 /*
2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <stdlib.h>
7 #include "__exitfunc.h"
9 /*****************************************************************************
11 NAME */
13 int on_exit(
15 /* SYNOPSIS */
16 void (*func)(int, void *),
17 void *arg)
19 /* FUNCTION
21 INPUTS
23 RESULT
25 NOTES
27 EXAMPLE
29 BUGS
31 SEE ALSO
33 INTERNALS
35 ******************************************************************************/
37 struct AtExitNode *aen = malloc(sizeof(*aen));
39 if (!aen) return -1;
41 aen->node.ln_Type = AEN_PTR;
42 aen->func.fptr = func;
43 aen->ptr = arg;
45 return __addexitfunc(aen);