* sigproc.cc (pending_signals::pending): Define new function.
(sig_dispatch_pending): Avoid calling sig_send if there are no pending signals.
This commit is contained in:
parent
c114604529
commit
dc3dc49831
|
@ -1,3 +1,9 @@
|
|||
2011-07-31 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||
|
||||
* sigproc.cc (pending_signals::pending): Define new function.
|
||||
(sig_dispatch_pending): Avoid calling sig_send if there are no pending
|
||||
signals.
|
||||
|
||||
2011-07-31 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (class fhandler_dev_mem): Remove dup method declaration.
|
||||
|
|
|
@ -88,6 +88,7 @@ public:
|
|||
void reset () {curr = &start; prev = &start;}
|
||||
void add (sigpacket&);
|
||||
void del ();
|
||||
bool pending () const {return !!start.next;}
|
||||
sigpacket *next ();
|
||||
sigpacket *save () const {return curr;}
|
||||
void restore (sigpacket *saved) {curr = saved;}
|
||||
|
@ -431,7 +432,13 @@ sig_dispatch_pending (bool fast)
|
|||
return;
|
||||
}
|
||||
|
||||
sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
|
||||
/* Non-atomically test for any signals pending and wake up wait_sig if any are
|
||||
found. It's ok if there's a race here since the next call to this function
|
||||
should catch it.
|
||||
FIXME: Eventually, wait_sig should wake up on its own to deal with pending
|
||||
signals. */
|
||||
if (sigq.pending ())
|
||||
sig_send (myself, fast ? __SIGFLUSHFAST : __SIGFLUSH);
|
||||
}
|
||||
|
||||
void __stdcall
|
||||
|
|
Loading…
Reference in New Issue