[Top][All Lists]

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

Guile and ucontext

From: Fredrik Tolf
Subject: Guile and ucontext
Date: Thu, 14 May 2009 04:09:46 +0200

Hi list,

I'd really like to use Guile in a program I'm writing, but I'm having a
problem in that I'm using the ucontext calls rather heavily to run a
great amount of light-weight threads (in only one pthread, that is), and
it seems that Guile doesn't exactly thrive in that environment.

>From what I can tell from Guile's threads.c, Guile will just record the
top and bottom of a single stack per pthread, and since I'm switching
stack pointer between the original stack at the top of the process to
heap-allocated stacks, it would try to mark data words from almost the
entire process space when GC'ing.

Is this correct, or is it perhaps possible to make Guile understand my
stack switching as it is? Or is it, perhaps, possible to turn off
marking of words on the stack? (I won't be keeping very many SCM
pointers there that aren't reachable from scheme variables anyway, and
if I do, I think I can protect them manually) If it isn't, I guess I'll
have to patch Guile to cope with multiple stacks, but I'd rather spare
myself that work unless it's necessary.

Thanks for reading!

Fredrik Tolf

reply via email to

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