qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chrysostomos Nanakos <cnanakos@grnet.gr>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com,
	Chrysostomos Nanakos <cnanakos@grnet.gr>,
	stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v1 1/2] Extend header file for atomic operations
Date: Mon,  1 Sep 2014 11:58:40 +0300	[thread overview]
Message-ID: <1409561921-4049-1-git-send-email-cnanakos@grnet.gr> (raw)

Add __sync_*_and_fetch builtins used in several places.

Signed-off-by: Chrysostomos Nanakos <cnanakos@grnet.gr>
---
 include/qemu/atomic.h |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index 492bce1..48fc283 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -189,6 +189,10 @@
 #define atomic_fetch_sub       __sync_fetch_and_sub
 #define atomic_fetch_and       __sync_fetch_and_and
 #define atomic_fetch_or        __sync_fetch_and_or
+#define atomic_add_fetch       __sync_add_and_fetch
+#define atomic_sub_fetch       __sync_sub_and_fetch
+#define atomic_or_fetch        __sync_or_and_fetch
+#define atomic_and_fetch       __sync_and_and_fetch
 #define atomic_cmpxchg         __sync_val_compare_and_swap
 
 /* And even shorter names that return void.  */
-- 
1.7.10.4

             reply	other threads:[~2014-09-01  9:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01  8:58 Chrysostomos Nanakos [this message]
2014-09-01  8:58 ` [Qemu-devel] [PATCH v1 2/2] block/archipelago: Use QEMU atomic builtins Chrysostomos Nanakos
2014-09-01  9:43   ` Paolo Bonzini
2014-09-01 10:13     ` Chrysostomos Nanakos
2014-09-01 10:33       ` Paolo Bonzini
2014-09-01 10:39         ` Chrysostomos Nanakos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409561921-4049-1-git-send-email-cnanakos@grnet.gr \
    --to=cnanakos@grnet.gr \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).