[Gc] porting to Win32 fibers

Andrew McKinlay mckinlay at axonsoft.com
Wed Feb 8 15:37:00 PST 2006


I'd like to port the collector to Win32 fibers, which are coroutines,
more or less. Has anyone done this? I'm assuming they haven't, based
on no mention of it.

>From searching the archives, I think what I need to do is define
GC_push_all_stacks. To do this it looks like I need to set
GC_push_other_roots.

However, the actual problem I'm seeing is a page fault in
GC_clear_stack_inner, presumably because the stack limit is wrong for
the additional stacks. It looks like the #ifdef THREADS version might
work. Should I be defining THREADS ? What other impact would this
have?

Note: Fibers are "cooperative" so no locking is required.

Is there anything else I should watch out for?

Thanks in advance for any info, suggestions, advice.

Andrew McKinlay
http://suneido.com



More information about the Gc mailing list