[Gc] Bug fix for entering multi-threaded mode
hans.boehm at hp.com
Sat Aug 1 11:04:38 PDT 2009
Thanks. (Belatedly) committed.
I'm not enthusiastic about the addition of GC_allow_register_threads, but I don't see a way to avoid it either. And this is certainly a lot better than the old buggy behavior.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Ivan Maidanski
> Sent: Saturday, June 13, 2009 10:43 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Bug fix for entering multi-threaded mode
> This small patch fixes the bug with unset GC_need_to_lock
> when only explicit registration of threads is used.
> This is, in fact, my diff51 and diff55 partly.
> The more detailed description is in
> ChangeLog entries:
> * pthread_support.c (GC_allow_register_threads): New
> API function.
> * win32_threads.c (GC_allow_register_threads): Ditto.
> * include/gc.h (GC_allow_register_threads): New API prototype.
> * include/gc.h (GC_register_my_thread,
> Update the comments.
> * pthread_support.c (GC_register_my_thread): Check
> the collector
> is in the multi-threaded mode.
> * win32_threads.c (GC_register_my_thread): Ditto.
More information about the Gc