|
From: | Jörg F. Wittenberger |
Subject: | Re: [Chicken-hackers] [PATCH] Fix for #989 and hopefully #877 too |
Date: | Wed, 06 Nov 2013 18:00:34 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
Am 06.11.2013 15:29, schrieb Peter Bex:
On Wed, Nov 06, 2013 at 03:21:18PM +0100, "Jörg F. Wittenberger" wrote:My solution at that time was to coalesce signals by type and handle all reasons of a particular signal in a single signal handler (anyway) since - as you're pointing out - this must be done in any case. That's why it's actually enough to have a single int "signal_pending" accumulate the signals in the "global_signal_handler" like this: signal_pending |= 1 << signum;Maybe it's just me, but there are 256 signal handler slots.
Now I cam confused. True, there are 256 possible signal handlers in ##sys#signal-vector How could those be addressed/used at all?
The manpage for signal(7) on my NetBSD box shows 32 signals. That means the pending signals won't ever fit in a fixnum on a 32-bit machine.
You're right: somehow it seems to have escaped me that attaching the type tag on the way from C to Scheme would reduce the number of bits avail. (Otherwise I've been working from my "sure knowledge" that there are only 32 signals, which in turn would fit into a single word.)
/Jörg
[Prev in Thread] | Current Thread | [Next in Thread] |