Can you undo change in sig_dispatch_pending() ?

Brian Ford Brian.Ford@FlightSafety.com
Wed Oct 31 18:40:00 GMT 2007


On Wed, 31 Oct 2007, Christopher Faylor wrote:

> Of course updating a single variable could conceivably not be racy.  We
> are talking about a separate thread which does all sorts of things to
> the variable, however, like preparing to update it, for instance.  It really
> is possible that the "sig" thread can be in the process of updating sigq
> while sig_dispatch_pending is in the process of testing it.

Yes, but it is also possible that it could be updating it just after
sig_dispatch_pending tested it.  So?

> If you have tests for this then you can either try removing the
> sig_dispatch_pending entirely and see how that works

I think I explained why that isn't a good idea, no?

> or you can generate data showing how often the sigq.start.next test is
> triggered and report the results here.

I'd like to understand what you meant by that more.  Did you mean how
often does it avoid the needless thread ping pong, or how often does it
actually invoke it?  I assume the latter as the performance data clearly
indicates the former is very frequent.

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