chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] remove enable/disable interrupt flag


From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] remove enable/disable interrupt flag
Date: 29 Sep 2011 18:56:03 +0200

On Sep 29 2011, Alan Post wrote:

The way Chicken is currently implemented, any signal that arrives
during this time is discarded, which also makes me unhappy with this

Wait, I'm confused.

During which time signals are really discarded?

As far as I read the source, the signal will be recorded, not discarded.

Now this could run into the situation, that there would be several
signals (to be) recorded until they are handled.

This is exactly the situation my changes to the signal handler as
initially proposed recently would handle.  At least for MAX_INT many
signals (which, when pending, should bring your machine down in any case).

situation.  A lot of blood and tears were spilled over signal
handling on Unix to get to reliable signal delivery.  I don't think
Chicken should implement unreliable signal delivery on top of a
reliable mechanism.

That's what I've been asking lately: should we call the signal handler
once for every signal, or might it be better to change the signal handlers
signature to receive the number of times the signal has seen since
the signal handler was called last time.

NB: the former would be easy to implement on top of the latter.
The latter could be quite some overhead for no good reason.

Maybe the latter should be the default which can be changed by the user.

My current code however does the opposite: it deliberately calls the handler once per invocation using the old API. Thereby possibly ignoring signals (it discards and resets the counter. (I had not yet the time to write the code for the maybe-case and change the API) Since my code does not count the signals, it works well under this condition.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]