[Gc] [PATCH] better thread support on Darwin (PPC)

Andrew Begel abegel at eecs.berkeley.edu
Tue Dec 16 12:18:15 PST 2003

The attached patch (to 6.3alpha2) reworks the stop/start the world code 
for Darwin/PPC to handle threads already in existence before 
pthread_create() is overridden by the GC. This means you can run the GC 
from a dylib loaded from a non-GC-aware application and still scan all 
threads in the process. In addition, thread scanning code no longer 
needs to know where the stacks have been allocated -- it will walk the 
stack chain from the stack pointer back to the top of the stack 
(provided the stack is PPC Mach-O-ABI compliant -- GCC-compiled C, C++, 
ObjC and ObjC++ code is, as well as JNI code plugged into a Java app) 
to find the stack limits. I put in some preliminary code to walk the 
stack on Darwin/i386, but haven't found enough information about the 
ABI to finish it. Right now there's a warning that it likely won't 

This patch works with the GC test app as well as my hard-to-get-right 
JNI plugin for program analysis.

Andrew Begel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gc.diff
Type: application/octet-stream
Size: 18585 bytes
Desc: not available
Url : https://napali.hpl.hp.com/pipermail/gc/attachments/20031216/44d6e845/gc.obj

More information about the Gc mailing list