static void __do_global_dtors_aux (void) { static func_ptr *p = __DTOR_LIST__ + 1; static int completed = 0; if (completed) return; #ifdef CRTSTUFFS_O if (__cxa_finalize) __cxa_finalize (__dso_handle); #endif while (*p) { p++; (*(p-1)) (); } #ifdef EH_FRAME_SECTION_ASM_OP if (__deregister_frame_info) __deregister_frame_info (__EH_FRAME_BEGIN__); #endif completed = 1; }
__do_global_dtors_aux (void) { static func_ptr *p = __DTOR_LIST__ + 1; static _Bool completed; func_ptr f; if (__builtin_expect (completed, 0)) return; #ifdef CRTSTUFFS_O if (__cxa_finalize) __cxa_finalize (__dso_handle); #endif while ((f = *p)) { p++; f (); } #ifdef USE_EH_FRAME_REGISTRY #if defined(CRT_GET_RFIB_TEXT) || defined(CRT_GET_RFIB_DATA) /* If we used the new __register_frame_info_bases interface, make sure that we deregister from the same place. */ if (__deregister_frame_info_bases) __deregister_frame_info_bases (__EH_FRAME_BEGIN__); #else if (__deregister_frame_info) __deregister_frame_info (__EH_FRAME_BEGIN__); #endif #endif completed = 1; }
/* * __attribute__((destructor)) places a call to the function in the * .fini_array section in PNaCl. The function pointers in .fini_array * at exit. */ void __attribute__((destructor)) __do_global_dtors_aux(void) { #ifdef SHARED /* TODO(pdox): Determine whether this call to __cxa_finalize * is actually needed or used. */ if (__cxa_finalize) __cxa_finalize (__dso_handle); #endif }
int main(int argc, char *argv[]) { exiting_state = 5; ASSERT(0 == atexit(normal_handler_0)); ASSERT(0 == atexit(normal_handler_1)); ASSERT(0 == __cxa_atexit(cxa_handler_4, &arg_1, &dso_handle_1)); ASSERT(0 == __cxa_atexit(cxa_handler_5, &arg_1, &dso_handle_1)); ASSERT(0 == __cxa_atexit(cxa_handler_3, &arg_2, &dso_handle_2)); ASSERT(0 == __cxa_atexit(cxa_handler_2, &arg_3, &dso_handle_3)); __cxa_finalize(&dso_handle_1); __cxa_finalize(&dso_handle_2); exit(0); }
/* * Exit, flushing stdio buffers if necessary. */ void exit(int status) { #if !TARGET_IPHONE_SIMULATOR && (__i386__ || __x86_64__) _tlv_exit(); // C++11 requires thread_local objects to be destroyed before global objects #endif __cxa_finalize(NULL); if (__cleanup) (*__cleanup)(); __exit(status); }
void exit(int status) { for (int i = 0; i < _atexit.count; ++i) { ExitFunction f = _atexit.functions[i]; (*f)(); } __cxa_finalize(NULL); // TODO: Handle exit status. (void)status; api_end(); }
void _do_fini(void) { static int finalized = 0; if (!finalized) { finalized = 1; if (__cxa_finalize != NULL) __cxa_finalize(__dso_handle); /* * since the _init() function sets up the destructors to * be called by atexit, do not call the destructors here. */ __dtors(); } }
__do_global_dtors_aux (void) { #ifndef FINI_ARRAY_SECTION_ASM_OP static func_ptr *p = __DTOR_LIST__ + 1; func_ptr f; #endif /* !defined(FINI_ARRAY_SECTION_ASM_OP) */ static _Bool completed; if (__builtin_expect (completed, 0)) return; #ifdef CRTSTUFFS_O if (__cxa_finalize) __cxa_finalize (__dso_handle); #endif #ifdef FINI_ARRAY_SECTION_ASM_OP /* If we are using .fini_array then destructors will be run via that mechanism. */ #else /* !defined (FINI_ARRAY_SECTION_ASM_OP) */ while ((f = *p)) { p++; f (); } #endif /* !defined(FINI_ARRAY_SECTION_ASM_OP) */ #ifdef USE_EH_FRAME_REGISTRY #ifdef CRT_GET_RFIB_DATA /* If we used the new __register_frame_info_bases interface, make sure that we deregister from the same place. */ if (__deregister_frame_info_bases) __deregister_frame_info_bases (__EH_FRAME_BEGIN__); #else if (__deregister_frame_info) __deregister_frame_info (__EH_FRAME_BEGIN__); #endif #endif completed = 1; }
void __on_dlclose() { __cxa_finalize(&__dso_handle); }
void __init_aix_libgcc_cxa_atexit (void) { __cxa_finalize (__dso_handle); }
static void _STD__cxa_finalize() { __cxa_finalize(&__dso_handle); }
void run_static_dtors() { __cxa_finalize(&__dso_handle); }
static void cleanup(void) { __cxa_finalize(&__dso_handle); }