Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6536 serge 1
/*
2
 * Implementation of __cxa_atexit.
3
 */
4
 
5
#include 
6
#include 
7
#include 
8
#include 
9
#include "atexit.h"
10
 
11
#ifdef _REENT_SMALL
12
 
13
#include "on_exit_args.h"
14
 
15
/* force linking of static instance of _on_exit_args */
16
const void * const __cxa_atexit_dummy = &__on_exit_args;
17
 
18
#endif	/* def _REENT_SMALL */
19
 
20
/*
21
 * Register a function to be performed at exit or DSO unload.
22
 */
23
 
24
int
25
_DEFUN (__cxa_atexit,
26
	(fn, arg, d),
27
	void (*fn) (void *) _AND
28
	void *arg _AND
29
	void *d)
30
{
31
#ifdef _LITE_EXIT
32
  /* Refer to comments in __atexit.c for more details of lite exit.  */
33
  int __register_exitproc _PARAMS ((int, void (*fn) (void), _PTR, _PTR))
34
    __attribute__ ((weak));
35
 
36
  if (!__register_exitproc)
37
    return 0;
38
  else
39
#endif
40
    return __register_exitproc (__et_cxa, (void (*)(void)) fn, arg, d);
41
}