unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Fredrik Tolf <fredrik@dolda2000.com>
To: guile-user@gnu.org
Subject: Guile and ucontext
Date: Thu, 14 May 2009 04:09:46 +0200	[thread overview]
Message-ID: <1242266987.6770.5.camel@pc7.dolda2000.com> (raw)

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	other threads:[~2009-05-14  2:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14  2:09 Fredrik Tolf [this message]
2009-05-16 12:07 ` Guile and ucontext 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1242266987.6770.5.camel@pc7.dolda2000.com \
    --to=fredrik@dolda2000.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).