On Sat, 2009-05-16 at 13:07 +0100, Neil Jerram wrote: > 1. On ia64, Guile's exception and continuation logic is already > implemented using setcontext() and getcontext(). (This is done via > some strange redefinitions of setjmp and longjmp; see __scm.h.) If > you follow through that code, and the things like stack saving and > copying that are done in conjunction with those calls, it may give you > a clear idea of what would be needed to support more general ucontext > switching.
Indeed? I'll look into that. Thank you! > >>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. > > I'm afraid I don't understand this. Are you changing the whole stack > of an existing thread? Well, yes. It is hard for me to think of how I would switch contexts without switching stacks as well. :) Fredrik Tolf
