Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: threaded programs report bogus process size ?



On Wed, Sep 30, 2009 at 06:53:50PM +0000, Christos Zoulas wrote:
> In article <20090930142747.8ED9F63B140%mail.netbsd.org@localhost>,
> Mindaugas Rasiukevicius  <rmind%netbsd.org@localhost> wrote:
> >christos%astron.com@localhost (Christos Zoulas) wrote:
> >> >To correct this the reclaim operation should loop over the queue
> >> >and try to reclaim any of the dead threads.
> >> 
> >> This seems to fix it.
> >> 
> >
> >Patch is wrong.  Apart from unnecessary re-lock in the loop and lock leak
> >after - consider the case when 'first_thread' after re-insertion into the
> >queue gets taken out by other pthread_create().  Infinite loop.
> 
> Here's a simpler one.

Which works fine.

Thanks.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Home | Main Index | Thread Index | Old Index