[Top][All Lists]

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

Re: [Chicken-hackers] PATCH: allow signal handlers to be called from any

From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] PATCH: allow signal handlers to be called from any thread.
Date: Thu, 3 Dec 2015 11:17:29 +0100
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Icedove/38.3.0


as promised:

Am 02.12.2015 um 14:57 schrieb Jörg F. Wittenberger:
> No more patches today.  This again is no good
> because it allocates a slot in pending_interrupts, but doesn't - and
> can't deallocate it.

No more patches yesterday.  This one sustained the test to sleep one
night over it.

It only fixes two problems with the current code: a) smashing
C_stack_limit with a pointer into some other threads stack  b) multiple
updates to saved_stack_limit with a value from C_stack_limit.

a) does typically result in a segfault and b) will reduce the effective
stack size until endlessly looping when it reaches zero.  Whereby (b) is
exacerbated by the fix to (a) to a single step till zero.

Since I found this whole signal handling a bit confusing, I added a few
lines of comments to the code.

Please try this time.

At this point the patch asserts that the chicken process will not fail.
 It does _not_ address the fact that the code will loose signals.  It
did before, it does now.

One more question.  I would have expected chicken to store signals
received while C_interrupts_enabled==0 and deliver them at some point
after C_interrupts_enabled becomes true.  Why are those signals ignored?

Have a good day


Attachment: 0008-Allowsignalhandlerstobedispatchedtomultiplethreads.patch
Description: Text Data

reply via email to

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