signal handling effeciency ?

Brian Ford
Wed Jul 26 15:50:00 GMT 2006

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

2006-02-24  Christopher Faylor  <cgf at timesys dot com>

        * (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

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

More information about the Cygwin-developers mailing list