diff options
author | Christopher Faylor <me@cgf.cx> | 2005-09-14 14:00:07 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-09-14 14:00:07 +0000 |
commit | a611ae50d5c1106988df7ec8b053efc332e35ae3 (patch) | |
tree | 0057df8d08fd439ed9bcfb06bd07538c6f2f9d6e /winsup/cygwin/exceptions.cc | |
parent | 67483cb2cdee37aa435fd108cea5310a873925a3 (diff) | |
download | newlib-a611ae50d5c1106988df7ec8b053efc332e35ae3.zip newlib-a611ae50d5c1106988df7ec8b053efc332e35ae3.tar.gz newlib-a611ae50d5c1106988df7ec8b053efc332e35ae3.tar.bz2 |
* exceptions.cc (sigtid): Remove declaration.
(handle_exceptions): Use _sig_tls rather than sigtid to determine if this is
the signal thread.
(set_signal_mask): Ditto for conditionalized CGF code.
* pinfo.cc (pinfo::exit): Exit the thread if we forcefully terminated the main
thread
* sigproc.cc (sigtid): Delete.
(_sig_tls): Define.
(sig_clear): Use _sig_tls rather than sigtid to determine if this is the signal
thread.
(sig_dispatch_pending): Ditto.
(wait_sig): Set _sig_tls here.
* dcrt0.cc (do_exit): Move sigproc_terminate call later since signal handling
was still needed for subsequent stuff. Call sigproc_terminate with new
exit_state value.
* pinfo.cc (pinfo::exit): Call sigproc_terminate with new exit_state value.
* sigproc.cc (proc_terminate): Remove unnecessary (void) parameter.
(sigproc_terminate): Ditto. Add new argument to accept exit state to be set.
(wait_sig): Reorganize __SIGEXIT handling. Add more debugging output.
* winsup.h (sigproc_terminate): Declare with new exit_state argument.
(exit_states): Reorganize to reflect new exit ordering of sigproc_terminate.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 939ec89..0f61409 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -36,8 +36,6 @@ static int handle_exceptions (EXCEPTION_RECORD *, void *, CONTEXT *, void *); extern void sigdelayed (); }; -extern DWORD sigtid; - extern DWORD dwExeced; static BOOL WINAPI ctrl_c_handler (DWORD); @@ -528,7 +526,7 @@ handle_exceptions (EXCEPTION_RECORD *e0, void *frame, CONTEXT *in0, void *) if (!me.fault_guarded () && (!cygwin_finished_initializing - || GetCurrentThreadId () == sigtid + || &_my_tls == _sig_tls || (void *) global_sigs[si.si_signo].sa_handler == (void *) SIG_DFL || (void *) global_sigs[si.si_signo].sa_handler == (void *) SIG_IGN || (void *) global_sigs[si.si_signo].sa_handler == (void *) SIG_ERR)) @@ -1002,7 +1000,7 @@ extern "C" void __stdcall set_signal_mask (sigset_t newmask, sigset_t& oldmask) { #ifdef CGF - if (GetCurrentThreadId () == sigtid) + if (&_my_tls == _sig_tls) small_printf ("********* waiting in signal thread\n"); #endif mask_sync.acquire (INFINITE); |