|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Make XEN_DOMCTL_destroydomain hypercall continua
Quoting Isaku Yamahata <yamahata@xxxxxxxxxxxxx>:
> diff -r 58d131f1fb35 -r 2c9db26f1d0e tools/libxc/xc_domain.c
> --- a/tools/libxc/xc_domain.c Fri Aug 24 16:32:56 2007 +0100
> +++ b/tools/libxc/xc_domain.c Tue Aug 28 13:06:41 2007 +0900
> @@ -55,10 +55,17 @@ int xc_domain_destroy(int xc_handle,
> int xc_domain_destroy(int xc_handle,
> uint32_t domid)
> {
> + int ret;
> DECLARE_DOMCTL;
> domctl.cmd = XEN_DOMCTL_destroydomain;
> domctl.domain = (domid_t)domid;
> - return do_domctl(xc_handle, &domctl);
> + for (;;) {
> + ret = do_domctl(xc_handle, &domctl)
> + if (ret && errno == EAGAIN)
> + continue;
> + break;
> + }
> + return ret;
> }
Isn't this loop a little bit obscure ?
Why not:
do {
ret = do_domctl(xc_handle, &domctl);
while (ret == EAGAIN);
Tristan.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|