[libvirt] PATCH: 18/25: Dynamic thread workers pool

Jim Meyering jim at meyering.net
Tue Jan 20 18:48:01 UTC 2009


"Daniel P. Berrange" <berrange at redhat.com> wrote:
> On Tue, Jan 20, 2009 at 11:21:03AM +0100, Jim Meyering wrote:
...
>> It'd be nice to make all of these "n*" members unsigned,
>> assuming that they should never go negative.
>
> I've not changed this to unsigned, because again we compare it
> in various places to the signed in config setting, and I'd
> prefer we address all this in one go

Makes sense.

>> >      int nsockets;
>> >      struct qemud_socket *sockets;
>> >      int nclients;
>
> Here is an update with the 3 flags renamed to something more clear

Thanks.
Good to go!

...
> diff --git a/qemud/qemud.h b/qemud/qemud.h
> --- a/qemud/qemud.h
> +++ b/qemud/qemud.h
> @@ -157,13 +157,24 @@ struct qemud_socket {
>      struct qemud_socket *next;
>  };
>
> +struct qemud_worker {
> +    pthread_t thread;
> +    int hasThread :1;
> +    int processingCall :1;
> +    int quitRequest : 1;




More information about the libvir-list mailing list