[Gc] Re: pthread_cancel(3) confuses 'GC_suspend_all ()'

Boehm, Hans hans.boehm at hp.com
Fri Sep 25 17:12:13 PDT 2009


I committed my patch with Ivan's corrections.  I doubt this will turn out to have been the last word on cancellation in the garbage collector, but I think it's a definite improvement.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Boehm, Hans
> Sent: Friday, September 25, 2009 4:44 PM
> To: Ivan Maidanski; gc at napali.hpl.hp.com
> Subject: RE: Re[7]: [Gc] Re: pthread_cancel(3) confuses 
> 'GC_suspend_all ()'
> 
> > From:  Ivan Maidanski
> > 
> > Minor correction is required:
> > 
> > 1. GC_try_to_collect: "DCL_LOCK_STATE;" should be the last one in 
> > locals declaration part (because DCL_LOCK_STATE might be 
> empty and a 
> > single ";" is an empty statement in C);
> > 
> > 2. A bit "mis-indentified" code:
> > #   if defined(GC_ASSERTIONS) && (defined(USE_COMPILER_TLS) \
> >        || (defined(LINUX) && !defined(ARM32) \
> >                   && (__GNUC__ > 3 || (__GNUC__ == 3 && 
> __GNUC_MINOR__ 
> > >= 3)) \
> > 		         || defined(HPUX) /* and probably 
> others ... */))
> > 
> > ->
> > 
> > #   if defined(GC_ASSERTIONS) && (defined(USE_COMPILER_TLS) \
> >        || (defined(LINUX) && !defined(ARM32) \
> >                 && (__GNUC__ > 3 || (__GNUC__ == 3 && 
> __GNUC_MINOR__ 
> > >= 3)) \
> >        || defined(HPUX) /* FIXME: and probably others ... */))
> > 
> > 
> Thanks.  Merged into my tree.  I'm about to check in the whole patch.
> 
> > Also: Do we need this for Cygwin? I guess no, right?
> That's certainly not required.  So long as we do the 
> cancellation assertion checking on one platform commonly used 
> by developers, I think we'll find at least the more obvious 
> bugs in this area.  I think that makes Linux more important 
> than anything else, since this is not a Windows issue.
> 
> The assertion checking here is a bit messy, but if we didn't 
> have it at all, a lot of cancellation-related bugs would 
> never be uncovered.
> 
> Hans
> 
> > 
> > Bye.
> > _______________________________________________
> > Gc mailing list
> > Gc at linux.hpl.hp.com
> > http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> > 
> _______________________________________________
> 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