From 8cabc308a2566b1703d1d96290f6940434412eac Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 10 Dec 2012 22:13:26 +0000 Subject: [PATCH] * sigproc.h (sig_send): Accept tid as argument #3. Default to NULL. * sigproc.cc (sig_send): Ditto. Pass tid to other sig_send. (sigpending): Send current thread as arg #3. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/sigproc.cc | 6 +++--- winsup/cygwin/sigproc.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index bbbad11a2..f9bca392e 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2012-12-10 Christopher Faylor + + * sigproc.h (sig_send): Accept tid as argument #3. Default to NULL. + * sigproc.cc (sig_send): Ditto. Pass tid to other sig_send. + (sigpending): Send current thread as arg #3. + 2012-12-07 Christopher Faylor * exceptions.cc (sigpacket::process): Reorganize to avoid use of tls diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 6c6bddb39..a08a55ed3 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -482,7 +482,7 @@ sig_clear (int target_sig) extern "C" int sigpending (sigset_t *mask) { - sigset_t outset = (sigset_t) sig_send (myself, __SIGPENDING); + sigset_t outset = (sigset_t) sig_send (myself, __SIGPENDING, &_my_tls); if (outset == SIG_BAD_MASK) return -1; *mask = outset; @@ -554,7 +554,7 @@ sigproc_terminate (exit_states es) } int __stdcall -sig_send (_pinfo *p, int sig) +sig_send (_pinfo *p, int sig, _cygtls *tid) { if (sig == __SIGHOLD) sigheld = true; @@ -578,7 +578,7 @@ sig_send (_pinfo *p, int sig) si.si_signo = sig; si.si_code = SI_KERNEL; si.si_pid = si.si_uid = si.si_errno = 0; - return sig_send (p, si); + return sig_send (p, si, tid); } /* Send a signal to another process by raising its signal semaphore. diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index b989f3fa1..a5a2e04c5 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -81,7 +81,7 @@ void __stdcall sigproc_terminate (enum exit_states); #endif bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1))); int __stdcall sig_send (_pinfo *, siginfo_t&, class _cygtls * = NULL) __attribute__ ((regparm (3))); -int __stdcall sig_send (_pinfo *, int) __attribute__ ((regparm (2))); +int __stdcall sig_send (_pinfo *, int, class _cygtls * = NULL) __attribute__ ((regparm (3))); void __stdcall signal_fixup_after_exec (); void __stdcall sigalloc (); -- 2.43.5