Re: [AD] mzscheme bindings in svn

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]




Jon Rafkind wrote:
Peter Wang wrote:
On 2007-04-28, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
That would be fine (but call it __al_xwin_dont_install_signal_handlers
or something).  A dirtier solution would be to save the MzScheme signal
handlers before calling allegro_init(), then restore them immediately
afterwards.  This would work with current and older versions of Allegro.

I think messing with the invariants about the garbage collector is tricky business and might lead to very strange results.
I don't think it's that tricky.  During the short time that Allegro is
initialising we wouldn't be writing to any pages which MzScheme has
marked as read-only (I'm assuming that's how it works) and we'd restore
it straight after.  Disabling *all* of Allegro's emergency signal
handlers seems overkill.

I was thinking a problem might occur when allegro is initialized via a scheme thread so other scheme things are going on and a write-barrier is hit while Allegro is being initialized. I'm sure its incredibly unlikely but if the situation ever arose the programmer would go bonkers trying to debug it.
I talked to a developer of mzscheme who said it should be ok to save/restore the signals used by mzscheme during Allegro initilization as well as blocking/unblocking SIGINT, SIGCHLD, and SIGPROF. I can probably do this without any modification to Allegro.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/