WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-devel] [PATCH] Make XEN_DOMCTL_destroydomain hypercall continua

To: tgingold@xxxxxxx
Subject: Re: [Xen-devel] [PATCH] Make XEN_DOMCTL_destroydomain hypercall continuable.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 28 Aug 2007 17:59:51 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 28 Aug 2007 02:00:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1188290082.46d3de228fbfc@xxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070828062031.GB12712%yamahata@xxxxxxxxxxxxx> <1188290082.46d3de228fbfc@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Tue, Aug 28, 2007 at 10:34:42AM +0200, tgingold@xxxxxxx wrote:
> 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);

Right. attached the updated one.

-- 
yamahata

Attachment: 15775_8e146ea8c43c_make_xen_domctl_destroydomain_hypercall_continuable.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel