Re: [PATCH v4 RESEND 1/4] threadpool impl

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

 



On Mon, Dec 06, 2010 at 10:49:00AM +0000, Daniel P. Berrange wrote:
> On Fri, Dec 03, 2010 at 10:49:25AM +0800, Hu Tao wrote:
> > On Thu, Dec 02, 2010 at 12:28:17PM +0000, Daniel P. Berrange wrote:
> > <...snip...>
> > > > +
> > > > +        if (virThreadCreate(&pool->workers[pool->nWorkers - 1],
> > > > +                            true,
> > > > +                            virThreadPoolWorker,
> > > > +                            pool) < 0) {
> > > > +            pool->nWorkers--;
> > > > +            goto error;
> > > > +        }
> > > 
> > > Small typo, that check should "!= NULL", rather than "< 0".
> > 
> > Confused. Do you mean virThreadCreate() or VIR_ALLOC() below? But both
> > return int.
> 
> virThreadCreate returns a  virThreadPtr  object, so you need to
> check for its pointer being non-NULL.

No, virThreadCreate doesn't allocate memory for a virThread object but
takes as its first parameter a virThreadPtr pointing to a virThread
object which is allocated by the caller.

I'd appreciate it if you can help review v5 of this series(link is
https://www.redhat.com/archives/libvir-list/2010-December/msg00181.html)

-- 
Thanks,
Hu Tao

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]