qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [v3 05/13] arch_init: alloc and free data struct in mul


From: Li, Liang Z
Subject: Re: [Qemu-devel] [v3 05/13] arch_init: alloc and free data struct in multi-thread compression
Date: Sat, 24 Jan 2015 13:46:57 +0000

> >  typedef struct compress_param compress_param;
> >
> > +enum {
> > +    DONE,
> > +    START,
> > +};
> > +
> 
> Do you really need any more than a 'bool busy' ?

Good ideal.

> >  struct decompress_param {
> >      /* To be done */
> >  };
> >  typedef struct decompress_param decompress_param;
> >
> >  static compress_param *comp_param;
> > +static QemuMutex *mutex;
> > +static QemuCond *cond;
> 
> Those need better names and a comment; If I'm reading it correctly, this
> cond is used to wake up the parent thread when one of the workers has
> finished it's task?

Yes, it is.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]