From fc6a0dc849d07c3aace5e06fa6eee01b45e83d68 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 2 Feb 2010 02:00:01 +0000 Subject: * dcrt0.cc (atexit_lock): Delete. (cygwin_exit): Remove atexit lock. (cygwin_atexit): Ditto. Rename parameter to match newlib. Call __cxa_atexit when invoked by a registered DLL. * dll_init.cc (remove_dll_atexit): Delete. (dll_list::find): New function. (dll_list::detach): Use dll_list::find to find dll associated with return address. Use __cxa_finalize to run atexit functions associated with the dll. (cygwin_detach_dll): Don't assume that HANDLE == void *. * dll_init.h (dll_list::find): Declare. (__cxa_atexit): Ditto. (__cxa_finalize): Ditto. * init.cc (dll_entry): Clarify comment. --- winsup/cygwin/init.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/init.cc') diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index efdd775c4..9bf49f2a3 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -126,7 +126,7 @@ dll_entry (HANDLE h, DWORD reason, void *static_load) cygwin_hmodule = (HMODULE) h; dynamically_loaded = (static_load == NULL); - /* Is the stack at an unusual address? This is, an address which + /* Is the stack at an unusual address? That is, an address which is in the usual space occupied by the process image, but below the auto load address of DLLs? Check if we're running in WOW64 on a 64 bit machine *and* are -- cgit v1.2.3