[Gc] GC v.7.1 DARWIN x86 usage of threads

Jim Hourihan jimhourihan at gmail.com
Mon Aug 30 13:11:12 PDT 2010


Last time I checked on darwin the gc did a stop world using mach calls so *all* threads are by default gc'd threads. In fact, there's no way to prevent this behavior. In our app we ended up hacking in darwin-only API to remove some threads from consideration. This seems to be the most inconsistent aspect of the library from an API perspective. I think the right way would be to make a darwin specific version of GC_unregister_my_thread(). I'd be happy to share our hack if anybody wants it.

    -Jim

On Aug 30, 2010, at 7:00 AM, Windev Windev wrote:

> Hi all, 
> 
> I have GC_DARWIN_THREAD macro defined. 
> What is the easiest way to create a thread and to register it to the threads list?
> 
> With GC_WIN32_THREADS, using GC_CreateThread does the trick(spawns thread and registers it via GC_win32_start).
> Is there an equivalent for this using GC_DARWIN_THREAD?
> 
> I have never used pthreads, so if there is a way to avoid it like on Win32, I would be very happy.
> 
> thanks
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/




More information about the Gc mailing list