mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* cygtls.h (_cygtls::get_signal_arrived): Add parameter to make lock/unlock
conditional. * exceptions.cc (_cygtls::interrupt_setup): Don't get a lock when setting signal_arrived since we already have one. * gendef: Add some comments to make it easier to find functions.
This commit is contained in:
parent
a4f34961d8
commit
9873ac53d7
@ -1,3 +1,11 @@
|
||||
2012-12-07 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||
|
||||
* cygtls.h (_cygtls::get_signal_arrived): Add parameter to make
|
||||
lock/unlock conditional.
|
||||
* exceptions.cc (_cygtls::interrupt_setup): Don't get a lock when
|
||||
setting signal_arrived since we already have one.
|
||||
* gendef: Add some comments to make it easier to find functions.
|
||||
|
||||
2012-12-06 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
|
||||
|
||||
* include/cygwin/wait.h (WAIT_ANY): Define.
|
||||
|
@ -233,14 +233,16 @@ public:
|
||||
void lock () __attribute__ ((regparm (1)));
|
||||
void unlock () __attribute__ ((regparm (1)));
|
||||
bool locked () __attribute__ ((regparm (1)));
|
||||
HANDLE get_signal_arrived ()
|
||||
HANDLE get_signal_arrived (bool wait_for_lock = true)
|
||||
{
|
||||
if (!signal_arrived)
|
||||
{
|
||||
lock ();
|
||||
if (wait_for_lock)
|
||||
lock ();
|
||||
if (!signal_arrived)
|
||||
signal_arrived = CreateEvent (&sec_none_nih, false, false, NULL);
|
||||
unlock ();
|
||||
if (wait_for_lock)
|
||||
unlock ();
|
||||
}
|
||||
return signal_arrived;
|
||||
}
|
||||
|
@ -799,7 +799,7 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga)
|
||||
this->sig = si.si_signo; // Should always be last thing set to avoid a race
|
||||
|
||||
if (incyg)
|
||||
SetEvent (get_signal_arrived ());
|
||||
SetEvent (get_signal_arrived (false));
|
||||
|
||||
proc_subproc (PROC_CLEARWAIT, 1);
|
||||
sigproc_printf ("armed signal_arrived %p, signal %d", signal_arrived, si.si_signo);
|
||||
|
@ -218,6 +218,7 @@ __ZN7_cygtls3popEv:
|
||||
popl %ebx
|
||||
ret
|
||||
|
||||
# _cygtls::lock
|
||||
.global __ZN7_cygtls4lockEv
|
||||
__ZN7_cygtls4lockEv:
|
||||
pushl %ebx
|
||||
@ -231,6 +232,7 @@ __ZN7_cygtls4lockEv:
|
||||
2: popl %ebx
|
||||
ret
|
||||
|
||||
# _cygtls::unlock
|
||||
.global __ZN7_cygtls6unlockEv
|
||||
__ZN7_cygtls6unlockEv:
|
||||
decl $tls::pstacklock(%eax)
|
||||
|
Loading…
x
Reference in New Issue
Block a user