* Makefile.in (clean): Remove sigfe.s.

(sigfe.s): Ensure that sigfe.s will be regenerated if it does not exist.
* dll_init.cc (dll_dllcrt0): Simplify initializing tests.
* exceptions.cc (setup_handler): Detect when stub caller is either spinning or
has acquired the lock after being suspended to avoid windows problems with
suspending a win32 API call.
* cygtls.h (_cygtls::spinning): Declare new element.
* gendef: Remove unused _siglist_index and _siglist declaration.
(_sigfe): Set spinning element when potentially looping, waiting for lock.
(_sigbe): Ditto.
(_cygtls::lock): Ditto.
(_longjmp): Ditto.
* tlsoffsets.h: Regenerate.
* pinfo.cc (_pinfo::exit): Set final exit state here.  Call sigproc_terminate
if invoked with 'norecord'.  Clear any residual _cygtls stuff.
* winsup.h (exit_states): Define ES_FINAL.
* spawn.cc (spawn_guts): Don't call proc_terminate specifically when execing.
Let _pinfo::exit handle that case.
* sigproc.cc (wait_subproc): Always exit loop early when proc_loop_wait.
* init.cc (munge_threadfunc): Eliminate unused argument.
(dll_entry): Reflect above change in call to munge_threadfunc.
This commit is contained in:
Christopher Faylor
2004-02-13 19:34:32 +00:00
parent b3535c2730
commit edc4f86ad2
12 changed files with 135 additions and 101 deletions

View File

@@ -56,7 +56,7 @@ prime_threads ()
/* If possible, redirect the thread entry point to a cygwin routine which
adds tls stuff to the stack. */
static void
munge_threadfunc (HANDLE cygwin_hmodule)
munge_threadfunc ()
{
char **ebp = (char **) __builtin_frame_address (0);
if (!threadfunc_ix)
@@ -67,7 +67,7 @@ munge_threadfunc (HANDLE cygwin_hmodule)
threadfunc_ix = peb - ebp;
goto foundit;
}
#ifdef DEBUGGING
#ifdef DEBUGGING_HARD
system_printf ("non-fatal warning: unknown thread! search_for %p, cygthread::stub %p, calibration_thread %p, possible func offset %p",
search_for, cygthread::stub, calibration_thread, ebp[137]);
#endif
@@ -102,7 +102,7 @@ dll_entry (HANDLE h, DWORD reason, void *static_load)
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
munge_threadfunc (h);
munge_threadfunc ();
break;
case DLL_THREAD_DETACH:
_my_tls.remove (0);