unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile and ucontext
@ 2009-05-14  2:09 Fredrik Tolf
  2009-05-16 12:07 ` Neil Jerram
  0 siblings, 1 reply; 6+ messages in thread
From: Fredrik Tolf @ 2009-05-14  2:09 UTC (permalink / raw)
  To: guile-user

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-23 15:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14  2:09 Guile and ucontext Fredrik Tolf
2009-05-16 12:07 ` Neil Jerram
2009-05-20 23:59   ` Fredrik Tolf
2009-05-23  9:58     ` Neil Jerram
2009-05-23 13:00       ` Fredrik Tolf
2009-05-23 15:30         ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).