From 562adf789066f0bbcd2999944a2648b42e8e8df9 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 16 May 2006 03:14:24 +0000 Subject: * sigproc.cc (no_signals_available): Detect hwait_sig == INVALID_HANDLE_VALUE. (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT. * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and no more. * cygtls.h (_my_tls::padding): Delete. (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the end of the stack. * dcrt0.cc (initialize_main_tls): Change return to void. * gentls_offsets: Treat const specially, too. Keep going after a '}' is found. Change negative offset calculation to use CYGTLS_PADSIZE. * init.cc (_my_oldfunc): New variable. (threadfunc_fe): Use stored tls value for oldfunc rather than blindly writing to the stack. (munge_threadfunc): Set oldfunc in tls. (dll_entry): Initialize tls allocation. * tlsoffsets.h: Regenerate. --- winsup/cygwin/sigproc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 10ff3cefc..9eb918dc1 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -39,7 +39,7 @@ details. */ #define WSSC 60000 // Wait for signal completion #define WPSP 40000 // Wait for proc_subproc mutex -#define no_signals_available(x) (!hwait_sig || ((x) && myself->exitcode & EXITCODE_SET) || &_my_tls == _sig_tls || in_dllentry) +#define no_signals_available(x) (!hwait_sig || hwait_sig == INVALID_HANDLE_VALUE || ((x) && myself->exitcode & EXITCODE_SET) || &_my_tls == _sig_tls || in_dllentry) #define NPROCS 256 @@ -1209,7 +1209,7 @@ wait_sig (VOID *) } break; case __SIGEXIT: - hwait_sig = NULL; + hwait_sig = (cygthread *) INVALID_HANDLE_VALUE; sigproc_printf ("saw __SIGEXIT"); break; /* handle below */ default: -- cgit v1.2.3