* 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.
This commit is contained in:
Christopher Faylor 2012-12-10 22:13:26 +00:00
parent 90943f078f
commit 8cabc308a2
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2012-12-10 Christopher Faylor <me.cygwin2012@cgf.cx>
* 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 <me.cygwin2012@cgf.cx>
* exceptions.cc (sigpacket::process): Reorganize to avoid use of tls

View File

@ -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.

View File

@ -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 ();