summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau2020-12-10 14:47:49 +0100
committerPaolo Bonzini2020-12-15 18:53:13 +0100
commitd55e5bd15aa8c235ac96501e587c7d38d38ec0e2 (patch)
treeb981cb11158baf9afd0e92d76a00b19ffbd6bd4c /include
parentpoison: remove GNUC check (diff)
downloadqemu-d55e5bd15aa8c235ac96501e587c7d38d38ec0e2.tar.gz
qemu-d55e5bd15aa8c235ac96501e587c7d38d38ec0e2.tar.xz
qemu-d55e5bd15aa8c235ac96501e587c7d38d38ec0e2.zip
xen: remove GNUC check
QEMU requires Clang or GCC, that define and support __GNUC__ extensions Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Stefano Stabellini <sstabellini@kernel.org> Message-Id: <20201210134752.780923-11-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/xen/interface/io/ring.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/hw/xen/interface/io/ring.h b/include/hw/xen/interface/io/ring.h
index 5d048b335c..115705f3f4 100644
--- a/include/hw/xen/interface/io/ring.h
+++ b/include/hw/xen/interface/io/ring.h
@@ -206,21 +206,12 @@ typedef struct __name##_back_ring __name##_back_ring_t
#define RING_HAS_UNCONSUMED_RESPONSES(_r) \
((_r)->sring->rsp_prod - (_r)->rsp_cons)
-#ifdef __GNUC__
#define RING_HAS_UNCONSUMED_REQUESTS(_r) ({ \
unsigned int req = (_r)->sring->req_prod - (_r)->req_cons; \
unsigned int rsp = RING_SIZE(_r) - \
((_r)->req_cons - (_r)->rsp_prod_pvt); \
req < rsp ? req : rsp; \
})
-#else
-/* Same as above, but without the nice GCC ({ ... }) syntax. */
-#define RING_HAS_UNCONSUMED_REQUESTS(_r) \
- ((((_r)->sring->req_prod - (_r)->req_cons) < \
- (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt))) ? \
- ((_r)->sring->req_prod - (_r)->req_cons) : \
- (RING_SIZE(_r) - ((_r)->req_cons - (_r)->rsp_prod_pvt)))
-#endif
/* Direct access to individual ring elements, by index. */
#define RING_GET_REQUEST(_r, _idx) \