diff options
Diffstat (limited to 'newlib/libc/stdlib/cxa_atexit.c')
-rw-r--r-- | newlib/libc/stdlib/cxa_atexit.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/cxa_atexit.c b/newlib/libc/stdlib/cxa_atexit.c new file mode 100644 index 000000000..8c39236de --- /dev/null +++ b/newlib/libc/stdlib/cxa_atexit.c @@ -0,0 +1,23 @@ +/* + * Implementation of __cxa_atexit. + */ + +#include <stddef.h> +#include <stdlib.h> +#include <reent.h> +#include <sys/lock.h> +#include "atexit.h" + +/* + * Register a function to be performed at exit or DSO unload. + */ + +int +_DEFUN (__cxa_atexit, + (fn, arg, d), + void (*fn) (void *) _AND + void *arg _AND + void *d) +{ + return __register_exitproc (__et_cxa, (void (*)(void)) fn, arg, d); +} |