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

Re: [Xen-devel] [PATCH V9 02/12] libxl_device: use async exec script api



Yang Hongyang writes ("[PATCH V9 02/12] libxl_device: use async exec script 
api"):
> use async exec script api to exec device related scripts.

Thanks.  Most of this is the other half of the code motion from the
previous patch.

> -    libxl__ev_child_init(&aodev->child);
> +    libxl__ev_child_init(&aodev->async_exec.child);

You need an init function, to avoid a layering violation.  The child
field should be accessed only from the async exec implementation.

> -    assert(libxl__ev_child_inuse(&aodev->child));
> +    assert(libxl__ev_child_inuse(&aodev->async_exec.child));

Likewise, you need an inuse function.

> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index eddafaf..cc8d558 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -2094,7 +2094,9 @@ struct libxl__ao_device {
>      /* device hotplug execution */
>      const char *what;
>      int num_exec;
> -    libxl__ev_child child;
> +
> +    libxl__egc *egc;
> +    libxl_async_exec async_exec;

I think this struct field name could profitably be shortened.  Perhaps
"exec" is too likely to clash but "aexec" would be OK.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.