[Gc] Using the Boehm-Demers-Weiser GC with a new threading library
Stephane.Epardaud at sophia.inria.fr
Tue Jun 21 01:49:20 PDT 2005
I've made very good progress with my threading library, by adding hooks that are
called by the GC's pthread_stop_world in order to collect all my thread's
synchronous and asynchronous roots.
I can also compile my lib without pthreads, in which case only synchronous
threads are available, but I don't really know what place is best to call my
hooks from the GC if pthread_stop_world is not called (compiling the GC with
The place I'm thinking about is either mart_rts.GC_push_roots() or
os_dep.GC_push_other_roots() but I'm not sure which is best.
Basically what I need to do at that point is call the hooks in my lib to
traverse all my threads and add their stacks as roots, and of course one of the
threads I have has its root in the current stack the GC is called into, but I'm
not really sure where the current stack is pushed.
Is it in mark_rts.GC_push_regs_and_stack() ? If yes, Isn't the current stack
pushed twice when compiling with pthreads (since the pthread_stop_world pushes
the stack of the current pthread also) ?
Thanks again for the great help.
PS: Is there an estimate date for a new 7.0 alpha/beta/release ?
More information about the Gc