From: Corneliu ZUZU Subject: Re: [PATCH v3 8/8] asm-x86/atomic.h: implement missing, add common prototypes Date: Thu, 14 Jul 2016 12:39:11 +0300 Message-ID: <7b0bacae-aa5b-6427-28bd-49bbe81b16b5@bitdefender.com> References: <1468487370-12345-1-git-send-email-czuzu@bitdefender.com> <1468487697-12705-1-git-send-email-czuzu@bitdefender.com> <69de8af9-1c5b-383a-adce-c60c85d7d3f2@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0079291553058732003==" Return-path: In-Reply-To: <69de8af9-1c5b-383a-adce-c60c85d7d3f2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Andrew Cooper , xen-devel@lists.xen.org Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============0079291553058732003== Content-Type: multipart/alternative; boundary="------------41E06828197C42D0DCA9C319" This is a multi-part message in MIME format. --------------41E06828197C42D0DCA9C319 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 7/14/2016 12:29 PM, Andrew Cooper wrote: > On 14/07/16 10:14, Corneliu ZUZU wrote: >> - implement missing functions atomic_{sub,inc,dec}_return(), atomic_add_unless() >> on X86 and also add prototypes for them in common >> >> - add missing macro atomic_xchg for X86 >> >> Signed-off-by: Corneliu ZUZU > > Reviewed-by: Andrew Cooper I'm not sure about atomic_sub_return(int i, atomic_t *v) implementation - is it ok? (calling arch_fetch_and_add(&v->counter, -i) with 2nd argument negative). Zuzu C. --------------41E06828197C42D0DCA9C319 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 7/14/2016 12:29 PM, Andrew Cooper wrote:
On 14/07/16 10:14, Corneliu ZUZU wrote:
- implement missing functions atomic_{sub,inc,dec}_return(), atomic_add_unless()
  on X86 and also add prototypes for them in common <xen/atomic.h>

- add missing macro atomic_xchg for X86

Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

I'm not sure about atomic_sub_return(int i, atomic_t *v) implementation - is it ok? (calling arch_fetch_and_add(&v->counter, -i) with 2nd argument negative).

Zuzu C.
--------------41E06828197C42D0DCA9C319-- --===============0079291553058732003== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============0079291553058732003==--