[Chicken-users] chicken interupt handling
Hi (Felix ;-), I wonder if there is a bug in the runtime.c concerning interrupt handling. But I don't understand the code enough. C_raise_interrupt will do C_regparm void C_fcall C_raise_interrupt(int reason) { if(C_interrupts_enabled) { saved_stack_limit = C_stack_limit; #if C_STACK_GROWS_DOWNWARD C_stack_limit = C_stack_pointer + 1000; #else C_stack_limit = C_stack_pointer - 1000; #endif interrupt_reason = reason; interrupt_time = C_cpu_milliseconds(); } } But there's already my first suspect: C_cpu_milliseconds boild down to a system call, which AFAIK could dispatch the next signal already. But things *seem* to get even worse: If I read the source right, then C_context_switch must be used to complete the handle_interrupt. Correct? And this too will (seems to) change global state wrt. stack pointers. Hence I'd say: any interrupt signal coming in between the initial C_raise_int and C_context_switch is potential harmful. At least I can not explain to myself, why the code would work for sure. After having played with several variations of signal delivery, all ending up in a tight loop sooner or later, I got the idea to add one more variable (puh): a flag being set to true at the bottom of C_context_switch (right before the trampoline call and set to 0 before the global_signal_handler calls C_raise_interrupt. Also C_raise_interrupt is only called if the flag was at 1, thus at most once per C_context_switch. While all those other experiments mitigated the issue at best, this one appears to work for hours. At least things ran over night. Best regards /Jerry .. ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] git build broken?
Hi, I just did a git pull and found irregex.scm not compiling. wrong argument (car) passed to not or so. The quick quess: revert to the old types.db to compile this single file seems to work out. /Jerry . ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] git build broken?
On Sun, Sep 04, 2011 at 08:57:26PM +0200, Jörg F. Wittenberger wrote: Hi, I just did a git pull and found irregex.scm not compiling. wrong argument (car) passed to not or so. The quick quess: revert to the old types.db to compile this single file seems to work out. Did you build a bootstrap compiler and retry? Lately there've been quite a few changes that break bootstrapping in annoying ways, but once you have a working bootstrap compiler you can compile a bootstrap compiler from git, and with that build Chicken from git. I built a chicken this afternoon and it worked, AFAIK there have been no new commits pushed since then. Cheers, Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] git build broken?
Hi, On Sun, 4 Sep 2011 21:01:11 +0200 Peter Bex peter@xs4all.nl wrote: On Sun, Sep 04, 2011 at 08:57:26PM +0200, Jörg F. Wittenberger wrote: I just did a git pull and found irregex.scm not compiling. wrong argument (car) passed to not or so. The quick quess: revert to the old types.db to compile this single file seems to work out. Did you build a bootstrap compiler and retry? Lately there've been quite a few changes that break bootstrapping in annoying ways, but once you have a working bootstrap compiler you can compile a bootstrap compiler from git, and with that build Chicken from git. I built a chicken this afternoon and it worked, AFAIK there have been no new commits pushed since then. It could also be built to run salmonella: http://tests.call-cc.org/master/linux/x86/2011/09/04/salmonella-report/ Best wishes. Mario -- http://parenteses.org/mario ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users