* sigproc.h (sigpacket): Remove parameter names from declarations.
(sigpacket::sigtls): Rename from 'tls'. * exceptions.cc (sigpacket::process): Define local tls variable and assign that to sigtls if appropriate. Clarify debugging output. * sigproc.cc (sig_send): Accommodate tls -> sigtls rename. (pending_signals::add): Ditto. (wait_sig): Ditto.
This commit is contained in:
parent
9873ac53d7
commit
0d1a50b81a
|
@ -1,3 +1,13 @@
|
||||||
|
2012-12-07 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
|
* sigproc.h (sigpacket): Remove parameter names from declarations.
|
||||||
|
(sigpacket::sigtls): Rename from 'tls'.
|
||||||
|
* exceptions.cc (sigpacket::process): Define local tls variable and
|
||||||
|
assign that to sigtls if appropriate. Clarify debugging output.
|
||||||
|
* sigproc.cc (sig_send): Accommodate tls -> sigtls rename.
|
||||||
|
(pending_signals::add): Ditto.
|
||||||
|
(wait_sig): Ditto.
|
||||||
|
|
||||||
2012-12-07 Christopher Faylor <me.cygwin2012@cgf.cx>
|
2012-12-07 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
* cygtls.h (_cygtls::get_signal_arrived): Add parameter to make
|
* cygtls.h (_cygtls::get_signal_arrived): Add parameter to make
|
||||||
|
|
|
@ -1123,6 +1123,7 @@ sigpacket::process ()
|
||||||
{
|
{
|
||||||
bool continue_now;
|
bool continue_now;
|
||||||
struct sigaction dummy = global_sigs[SIGSTOP];
|
struct sigaction dummy = global_sigs[SIGSTOP];
|
||||||
|
_cygtls *tls;
|
||||||
|
|
||||||
if (si.si_signo != SIGCONT)
|
if (si.si_signo != SIGCONT)
|
||||||
continue_now = false;
|
continue_now = false;
|
||||||
|
@ -1168,8 +1169,11 @@ sigpacket::process ()
|
||||||
if (have_execed)
|
if (have_execed)
|
||||||
handler = NULL;
|
handler = NULL;
|
||||||
|
|
||||||
if (tls)
|
if (sigtls)
|
||||||
sigproc_printf ("using tls %p", tls);
|
{
|
||||||
|
tls = sigtls;
|
||||||
|
sigproc_printf ("using sigtls %p", tls);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tls = cygheap->find_tls (si.si_signo);
|
tls = cygheap->find_tls (si.si_signo);
|
||||||
|
|
|
@ -704,7 +704,7 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
|
||||||
if (!pack.si.si_uid)
|
if (!pack.si.si_uid)
|
||||||
pack.si.si_uid = myself->uid;
|
pack.si.si_uid = myself->uid;
|
||||||
pack.pid = myself->pid;
|
pack.pid = myself->pid;
|
||||||
pack.tls = tls;
|
pack.sigtls = tls;
|
||||||
if (wait_for_completion)
|
if (wait_for_completion)
|
||||||
{
|
{
|
||||||
pack.wakeup = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
|
pack.wakeup = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
|
||||||
|
@ -1299,7 +1299,7 @@ pending_signals::add (sigpacket& pack)
|
||||||
return;
|
return;
|
||||||
se = sigs + pack.si.si_signo;
|
se = sigs + pack.si.si_signo;
|
||||||
*se = pack;
|
*se = pack;
|
||||||
se->mask = &pack.tls->sigmask;
|
se->mask = &pack.sigtls->sigmask;
|
||||||
se->next = NULL;
|
se->next = NULL;
|
||||||
if (end)
|
if (end)
|
||||||
end->next = se;
|
end->next = se;
|
||||||
|
@ -1352,7 +1352,7 @@ wait_sig (VOID *)
|
||||||
if (pack.si.si_signo == __SIGHOLD)
|
if (pack.si.si_signo == __SIGHOLD)
|
||||||
WaitForSingleObject (sig_hold, INFINITE);
|
WaitForSingleObject (sig_hold, INFINITE);
|
||||||
DWORD nb;
|
DWORD nb;
|
||||||
pack.tls = NULL;
|
pack.sigtls = NULL;
|
||||||
if (!ReadFile (my_readsig, &pack, sizeof (pack), &nb, NULL))
|
if (!ReadFile (my_readsig, &pack, sizeof (pack), &nb, NULL))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1393,7 +1393,7 @@ wait_sig (VOID *)
|
||||||
unsigned bit;
|
unsigned bit;
|
||||||
sigq.reset ();
|
sigq.reset ();
|
||||||
while ((q = sigq.next ()))
|
while ((q = sigq.next ()))
|
||||||
if (pack.tls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
|
if (pack.sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
|
||||||
*pack.mask |= bit;
|
*pack.mask |= bit;
|
||||||
break;
|
break;
|
||||||
case __SIGHOLD:
|
case __SIGHOLD:
|
||||||
|
@ -1428,7 +1428,7 @@ wait_sig (VOID *)
|
||||||
// FIXME: REALLY not right when taking threads into consideration.
|
// FIXME: REALLY not right when taking threads into consideration.
|
||||||
// We need a per-thread queue since each thread can have its own
|
// We need a per-thread queue since each thread can have its own
|
||||||
// list of blocked signals. CGF 2005-08-24
|
// list of blocked signals. CGF 2005-08-24
|
||||||
if (sigq.sigs[sig].si.si_signo && sigq.sigs[sig].tls == pack.tls)
|
if (sigq.sigs[sig].si.si_signo && sigq.sigs[sig].sigtls == pack.sigtls)
|
||||||
sigproc_printf ("signal %d already queued", pack.si.si_signo);
|
sigproc_printf ("signal %d already queued", pack.si.si_signo);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct sigpacket
|
||||||
{
|
{
|
||||||
siginfo_t si;
|
siginfo_t si;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
class _cygtls *tls;
|
class _cygtls *sigtls;
|
||||||
sigset_t *mask;
|
sigset_t *mask;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ struct sigpacket
|
||||||
struct sigpacket *next;
|
struct sigpacket *next;
|
||||||
};
|
};
|
||||||
int __stdcall process () __attribute__ ((regparm (1)));
|
int __stdcall process () __attribute__ ((regparm (1)));
|
||||||
int setup_handler (void *handler, struct sigaction& siga, _cygtls *tls)
|
int setup_handler (void *, struct sigaction&, _cygtls *)
|
||||||
__attribute__ ((regparm (3)));
|
__attribute__ ((regparm (3)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ void __stdcall sigproc_init ();
|
||||||
void __stdcall sigproc_terminate (enum exit_states);
|
void __stdcall sigproc_terminate (enum exit_states);
|
||||||
#endif
|
#endif
|
||||||
bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1)));
|
bool __stdcall pid_exists (pid_t) __attribute__ ((regparm(1)));
|
||||||
int __stdcall sig_send (_pinfo *, siginfo_t&, class _cygtls *tls = NULL) __attribute__ ((regparm (3)));
|
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) __attribute__ ((regparm (2)));
|
||||||
void __stdcall signal_fixup_after_exec ();
|
void __stdcall signal_fixup_after_exec ();
|
||||||
void __stdcall sigalloc ();
|
void __stdcall sigalloc ();
|
||||||
|
|
Loading…
Reference in New Issue