1 /* Copyright (C) 1991-2017 Free Software Foundation, Inc.
3 Derived from exit.h in GNU C Library.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
29 #define attribute_hidden
37 ef_free
, /* `ef_free' MUST be zero! */
46 /* `flavour' should be of type of the `enum' above but since we need
47 this element in an atomic operation we have to use `long int'. */
54 void (*fn
) (int status
, void *arg
);
59 void (*fn
) (void *arg
, int status
);
65 struct exit_function_list
67 struct exit_function_list
*next
;
69 struct exit_function fns
[32];
71 extern struct exit_function_list
*__exit_funcs attribute_hidden
;
72 extern struct exit_function_list
*__quick_exit_funcs attribute_hidden
;
74 extern struct exit_function
*__new_exitfn (struct exit_function_list
**listp
);
75 extern uint64_t __new_exitfn_called attribute_hidden
;
77 extern void __run_exit_handlers (int status
, struct exit_function_list
**listp
,
79 attribute_hidden
__attribute__ ((__noreturn__
));
81 extern int __internal_atexit (void (*func
) (void *), void *arg
, void *d
,
82 struct exit_function_list
**listp
)
84 extern int __cxa_at_quick_exit (void (*func
) (void *), void *d
);
86 extern int __cxa_atexit (void (*func
) (void *), void *arg
, void *d
);
87 extern int __cxa_atexit_internal (void (*func
) (void *), void *arg
, void *d
)
90 extern void __cxa_finalize (void *d
);