On Sep 29 2011, Jörg F. Wittenberger wrote:

Wait, I'm confused.

Obviously I am.

I've been talking nonsense.  Sorry for the confusion.

Finalizers and signal handlers are run with the same restrictions
on allocating memory.

(My confusion came from the idea in the back of my head, that I might
eventually remove the handle_interrupt at the begin of C_reclaim
completely if I could prove that running finalizers where I run
signal handlers right now would be a safe thing to do.)

Right now I'm running signal handlers from the scheduler as soon
as the yielding thread is where it belongs (ready queue or garbage).
That would be after the context switch.

But as I'm preparing this message I noticed that there's another badly
handles case in my code (EINTR translated into a thread-yield if I'm
correct).

However I need to remind you that I'm currently working from kinda
wild guess work.  I'm reading the code and docs I found so far.
(Giving priority to the way I understand the current code.)

And there is one more case where I might need some help.

A bad one in fact.

The whole s* works quite well with many threads.  However somehow I'm
missing the spot where I can hook into the execution right *after*
gc.  With threads: in ##sys#schedule in scheduler.scm without threads
I'm unsure.  As I read the source it should arrive in ##sys#schedule
too, but this time in library.scm.

However: there I called the signal handler too.

So far I have *not* made sure that it is not called.
But trying to stop chicken compiling itself by pressing C-c will be
ignored.

I know: this could have been a different reason.




_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to