diff options
author | Christopher Faylor <me@cgf.cx> | 2010-02-02 02:00:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-02-02 02:00:01 +0000 |
commit | fc6a0dc849d07c3aace5e06fa6eee01b45e83d68 (patch) | |
tree | dac1dd4b9a2ec218156b50c57db3753c58c81413 /winsup/cygwin/dll_init.h | |
parent | a3906150100103ab8e268f9ad0785fca83341e9f (diff) | |
download | cygnal-fc6a0dc849d07c3aace5e06fa6eee01b45e83d68.tar.gz cygnal-fc6a0dc849d07c3aace5e06fa6eee01b45e83d68.tar.bz2 cygnal-fc6a0dc849d07c3aace5e06fa6eee01b45e83d68.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/dll_init.h')
-rw-r--r-- | winsup/cygwin/dll_init.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/dll_init.h index 90cfa03e2..b37406e82 100644 --- a/winsup/cygwin/dll_init.h +++ b/winsup/cygwin/dll_init.h @@ -79,6 +79,7 @@ public: int reload_on_fork; dll *operator [] (const PWCHAR name); dll *alloc (HINSTANCE, per_process *, dll_type); + dll *find (void *); void detach (void *); void init (); void load_after_fork (HANDLE); @@ -100,3 +101,8 @@ public: extern dll_list dlls; void dll_global_dtors (); + +/* These probably belong in a newlib header but we can keep them here + for now. */ +extern "C" int __cxa_atexit(void (*)(void*), void*, void*); +extern "C" int __cxa_finalize(void*); |