diff options
author | Christopher Faylor <me@cgf.cx> | 2012-08-15 16:35:00 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-08-15 16:35:00 +0000 |
commit | d57a4725b1dde16e292ed7a9898752b4e2277766 (patch) | |
tree | a3596c31e2702e4fad52bcd27bf8ed02a27a87f0 /winsup/cygwin | |
parent | 0123506d2df6775cc3251f33f3983cd32103c663 (diff) | |
download | newlib-d57a4725b1dde16e292ed7a9898752b4e2277766.zip newlib-d57a4725b1dde16e292ed7a9898752b4e2277766.tar.gz newlib-d57a4725b1dde16e292ed7a9898752b4e2277766.tar.bz2 |
* exceptions.cc (sigdelayed): Move declaration to sigproc.h.
* sigproc.h (sigdelayed): Make symbol globally available.
* gendef (sigdelayed): Specifically zero incyg and stacklock.
* signal.cc (sigwaitinfo): Lock _my_tls and try harder to clean up signal
information.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 2 | ||||
-rwxr-xr-x | winsup/cygwin/gendef | 5 | ||||
-rw-r--r-- | winsup/cygwin/signal.cc | 6 | ||||
-rw-r--r-- | winsup/cygwin/sigproc.h | 2 |
5 files changed, 18 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ddf98d2..d93d2ee 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,13 @@ 2012-08-15 Christopher Faylor <me.cygwin2012@cgf.cx> + * exceptions.cc (sigdelayed): Move declaration to sigproc.h. + * sigproc.h (sigdelayed): Make symbol globally available. + * gendef (sigdelayed): Specifically zero incyg and stacklock. + * signal.cc (sigwaitinfo): Lock _my_tls and try harder to clean up + signal information. + +2012-08-15 Christopher Faylor <me.cygwin2012@cgf.cx> + * pinfo.cc (_pinfo::exists): Don't consider an execed process to exist. 2012-08-14 Corinna Vinschen <corinna@vinschen.de> diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 649574f..8df69f2 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -37,8 +37,6 @@ details. */ char debugger_command[2 * NT_MAX_PATH + 20]; -extern "C" void sigdelayed (); - static BOOL WINAPI ctrl_c_handler (DWORD); /* This is set to indicate that we have already exited. */ diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef index 5cc06f7..ddffe58 100755 --- a/winsup/cygwin/gendef +++ b/winsup/cygwin/gendef @@ -196,8 +196,9 @@ _sigdelayed: xorl %ebp,%ebp xchgl %ebp,-4(%eax) # get return address from signal stack xchgl %ebp,28(%esp) # store real return address -leave: decl $tls::incyg(%ebx) - decl $tls::stacklock(%ebx) # unlock +leave: xorl %eax,%eax + movl %eax,$tls::incyg(%ebx) + movl %eax,$tls::stacklock(%ebx) # unlock popl %eax popl %ebx diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index f3a3a3a..b833588 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -590,10 +590,14 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info) } else { + _my_tls.lock (); if (info) *info = _my_tls.infodata; res = _my_tls.infodata.si_signo; - InterlockedExchange ((LONG *) &_my_tls.sig, (LONG) 0); + _my_tls.sig = 0; + if (_my_tls.retaddr () == (__stack_t) sigdelayed) + _my_tls.pop (); + _my_tls.unlock (); } break; default: diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index 06ebd68..6e6f3f4 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -86,6 +86,8 @@ void __stdcall sigalloc (); int kill_pgrp (pid_t, siginfo_t&); int killsys (pid_t, int); +extern "C" void sigdelayed (); + extern char myself_nowait_dummy[]; extern struct sigaction *global_sigs; |