diff options
author | Christopher Faylor <me@cgf.cx> | 2010-08-01 19:10:52 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-08-01 19:10:52 +0000 |
commit | 0b6fbd396ca2f5448acb925a0b7f718676980d74 (patch) | |
tree | 0a31f9e9cd5c01589706e58e65356cd925aaea3b /winsup/cygwin/exceptions.cc | |
parent | 6defc805c3ca59f6a15d2ce0d52bd72efd2a4504 (diff) | |
download | cygnal-0b6fbd396ca2f5448acb925a0b7f718676980d74.tar.gz cygnal-0b6fbd396ca2f5448acb925a0b7f718676980d74.tar.bz2 cygnal-0b6fbd396ca2f5448acb925a0b7f718676980d74.zip |
* exceptions.cc (_cygtls::interrupt_now): Revert to checking for "spinning"
when choosing to defer signal.
(_cygtls::call_signal_handler): Grab func when we have the lock.
* gendef: Update copyright.
(__sigbe): Simplify slightly.
(_sigdelayed): Grab a lock before manipulating stuff.
(_cygtls::pop): Properly return popped value.
(stabilize_sig_stack): Set incyg when we have the lock.
* sigproc.cc: Update copyright.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 50ee79512..a2afa5e0f 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -778,7 +778,11 @@ _cygtls::interrupt_now (CONTEXT *cx, int sig, void *handler, { bool interrupted; - if (incyg || inside_kernel (cx)) + /* Delay the interrupt if we are + 1) somehow inside the DLL + 2) in _sigfe (spinning is true) and about to enter cygwin DLL + 3) in a Windows DLL. */ + if (incyg || spinning || inside_kernel (cx)) interrupted = false; else { @@ -1372,6 +1376,7 @@ _cygtls::call_signal_handler () lock (); this_sa_flags = sa_flags; int thissig = sig; + void (*thisfunc) (int) = func; pop (); reset_signal_arrived (); @@ -1382,13 +1387,13 @@ _cygtls::call_signal_handler () incyg = 0; if (!(this_sa_flags & SA_SIGINFO)) { - void (*sigfunc) (int) = func; + void (*sigfunc) (int) = thisfunc; sigfunc (thissig); } else { siginfo_t thissi = infodata; - void (*sigact) (int, siginfo_t *, void *) = (void (*) (int, siginfo_t *, void *)) func; + void (*sigact) (int, siginfo_t *, void *) = (void (*) (int, siginfo_t *, void *)) thisfunc; /* no ucontext_t information provided yet */ sigact (thissig, &thissi, NULL); } |