From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felix Schmoll Subject: Re: [PATCH XTF v4] Implement pv_read_some Date: Tue, 25 Jul 2017 09:00:50 +0200 Message-ID: References: <20170724062415.1542-1-eggi.innovations@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6152027561012285931==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZtqX-00054m-M9 for xen-devel@lists.xenproject.org; Tue, 25 Jul 2017 07:01:33 +0000 Received: by mail-it0-f43.google.com with SMTP id v127so46771263itd.0 for ; Tue, 25 Jul 2017 00:01:31 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Andrew Cooper Cc: xen-devel , Wei Liu List-Id: xen-devel@lists.xenproject.org --===============6152027561012285931== Content-Type: multipart/alternative; boundary="001a11406468aa679305551ee6a1" --001a11406468aa679305551ee6a1 Content-Type: text/plain; charset="UTF-8" 2017-07-25 8:58 GMT+02:00 Felix Schmoll : > 2017-07-24 12:38 GMT+02:00 Andrew Cooper : >> >> >> Given the confusion this has caused on IRC, I'd prefer that the code was >> explicit. Is the following ok? >> >> cons = pv_ring->in_cons; >> prod = LOAD_ACQUIRE(&pv_ring->in_prod); >> >> If so, I can fix up on commit. >> >> ~Andrew >> >> > I'm not really convinced by this: If this was really happening, then you > could never do multiple declarations in the same line because it would > always degrade. > > According to for example Wikipedia, > > /** * Commas act as separators in this line, not as an operator. * Results: a=1, b=2, c=3, i=0 */int a=1, b=2, c=3, i=0; > > Also, read_some is obviously modeled after write_some, so you would have > to change that one too. > Nevermind, sure, go ahead. --001a11406468aa679305551ee6a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
2017= -07-25 8:58 GMT+02:00 Felix Schmoll <eggi.innovations@gmail.com>:
2017-07-24 12= :38 GMT+02:00 Andrew Cooper <andrew.cooper3@citrix.com>:

Given the confusion this has caused on IRC, I'd prefer that= the code was
explicit.=C2=A0 Is the following ok?

cons =3D pv_ring->in_cons;
prod =3D LOAD_ACQUIRE(&pv_ring->in_prod);

If so, I can fix up on commit.
<= br> ~Andrew


= I'm not really convinced by this: If this was really happening, then yo= u could never do multiple declarations in the same line because it would al= ways degrade.

According to for example Wikipedia,=C2=A0
/=
**
 *  Commas act as separators in this line, not as an o=
perator.
 *  Results: a=3D1, b=3D2, c=3D3, i=3D0
 */
int a=3D1, b=3D2, c=3D3, i=3D0;
Also, read_some is obv= iously modeled after write_some, so you would have to change that one too.<= /div>

Nevermind, sure, go= ahead.
--001a11406468aa679305551ee6a1-- --===============6152027561012285931== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============6152027561012285931==--