This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: signal handling effeciency ?
On Mon, 24 Jul 2006, Brian Ford wrote:
> Is the event create, wait for signal thread, event destroy sequence per
> read call by design? That ping-pong per system call seems like a lot of
> overhead.
My currently limited understanding is that this behavior started with this
change:
2006-02-24 Christopher Faylor <cgf at timesys dot com>
* sigproc.cc (sigheld): Define new variable.
-> (sig_dispatch_pending): Don't check sigq since that's racy.
(sig_send): Set sigheld flag if __SIGHOLD is specified, reset it if
__SIGNOHOLD is specified. Ignore flush signals if we're holding
signals.
but that sig_dispatch_pending is (at least was from Pierre's
significantly dated comments in the archives) a best effort function.
Thus, doesn't the overhead reduction justify the race?
(I know, the signal handling code is a complex thing you don't like to
think about or talk to an amateur Cygwin developer about.)
--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...