OSDN Git Service

* cygthread.cc (cygthread::stub): Don't create event for long-running threads.
authorcgf <cgf>
Sun, 13 Oct 2002 18:16:33 +0000 (18:16 +0000)
committercgf <cgf>
Sun, 13 Oct 2002 18:16:33 +0000 (18:16 +0000)
commit860279d6a5aa9ec30c5314e82e85b2b031174e53
tree3a6a96b396755e377741d34ef601942354f14969
parent46abb39c8fa9e326849f4d8be6d21793e0623f01
* cygthread.cc (cygthread::stub): Don't create event for long-running threads.
Initialize thread_sync event here which is used to Suspend using an event
rather than relying on SuspendThread/ResumeThread.
(cygthread::init): Save handle to runner thread for future termination.
(cygthread::cygthread): Only resume thread when it is actually suspended.
Otherwise signal thread completion event.
(cygthread::terminate): Forcibly terminate runner thread and any helper
threads.  Call DisableThreadLibrary calls if execing.
* cygthread.h (cygthread::thread_sync): Declare.
* dcrt0.cc (do_exit): Eliminate calls to obsolete window_terminate and
shared_terminate.
* exceptions.cc (events_terminate): Don't bother closing title_mutex since it
is going away anyway.
* pinfo.cc (_pinfo::exit): Call cygthread::terminate to ensure that threads are
shut down before process exit or otherwise strange races seem to occur.
* shared.cc (shared_terminate): Eliminate.
* shared.h (shared_terminate): Eliminate declaration.
* winsup.h (window_terminate): Eliminate declaration.
* spawn.cc (spawn_guts): Call cygthread::terminate early in process if execing.
Call DisableThreadLibrary calls if execing.
* window.cc (Winmain): Call ExitThread to force exit.
(window_terminate): Eliminate.
* dcrt0.cc (do_exit): Track exit state more closely.
winsup/cygwin/ChangeLog
winsup/cygwin/cygthread.cc
winsup/cygwin/cygthread.h
winsup/cygwin/dcrt0.cc
winsup/cygwin/exceptions.cc
winsup/cygwin/pinfo.cc
winsup/cygwin/shared.cc
winsup/cygwin/shared_info.h
winsup/cygwin/spawn.cc
winsup/cygwin/window.cc
winsup/cygwin/winsup.h