Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-03-09 04:24:08 +0300
committerChristopher Faylor <me@cgf.cx>2004-03-09 04:24:08 +0300
commit5fb0fe79eb76f59ac5d88e15c38b6e7bc63f9c91 (patch)
treec57bdf1735ddd76ac2dbb6a72c92ecaef9dd4d78 /winsup/cygwin/exceptions.cc
parent0c378b648ef9a141ade2bdffb4dfa5ea43fd03d4 (diff)
* exceptions.cc (setup_handler): Avoid suspending a thread if it in a cygwin
function, in an exception, spinning, or locked. * gendef (_sigfe): Move incyg setting earlier. (sigreturn): Set incyg flag to avoid interrupting called cygwin functions. (sigdelayed): Ditto. (stabilize_sig_stack): Ditto. * sigproc.cc (proc_subproc): Don't restore process lock early in exec case. * cygtls.h: Reorganize fields in _cygtls slightly. * tlsoffsets.h: Regenerate.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 086ced32b..b99ffe4df 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -786,12 +786,12 @@ setup_handler (int sig, void *handler, struct sigaction& siga, _cygtls *tls)
#endif
res = SuspendThread (hth);
/* Just set pending if thread is already suspended */
- if (res || tls->incyg)
+ if (res)
{
(void) ResumeThread (hth);
break;
}
- if (!tls->locked () && !tls->spinning)
+ if (!tls->incyg && !tls->in_exception () && !tls->spinning && !tls->locked ())
{
cx.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
if (!GetThreadContext (hth, &cx))