Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-23 Thread Stefan Hajnoczi
On Tue, Sep 22, 2020 at 09:18:49AM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 22, 2020 at 08:56:06AM +0200, Paolo Bonzini wrote: > > On 22/09/20 08:45, David Hildenbrand wrote: > > >> It's certainly a good idea but it's quite verbose. > > >> > > >> What about using atomic__* as the prefix? It

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Stefan Hajnoczi
On Mon, Sep 21, 2020 at 04:29:10PM -0500, Eric Blake wrote: > On 9/21/20 11:23 AM, Stefan Hajnoczi wrote: Thanks for the review! Your feedback prompted me to do this more systematically. I fixed the command-lines and published a diff of just the manual changes I made on top of the mechanical

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Philippe Mathieu-Daudé
On 9/22/20 10:17 AM, Stefan Hajnoczi wrote: > On Mon, Sep 21, 2020 at 01:56:08PM -0700, no-re...@patchew.org wrote: >> ERROR: Macros with multiple statements should be enclosed in a do - while >> loop >> #2968: FILE: include/qemu/atomic.h:152: >> +#define qemu_atomic_rcu_read__nocheck(ptr,

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Daniel P . Berrangé
On Tue, Sep 22, 2020 at 08:56:06AM +0200, Paolo Bonzini wrote: > On 22/09/20 08:45, David Hildenbrand wrote: > >> It's certainly a good idea but it's quite verbose. > >> > >> What about using atomic__* as the prefix? It is not very common in QEMU > >> but there are some cases (and I cannot think

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Stefan Hajnoczi
On Mon, Sep 21, 2020 at 01:56:08PM -0700, no-re...@patchew.org wrote: > ERROR: Macros with multiple statements should be enclosed in a do - while loop > #2968: FILE: include/qemu/atomic.h:152: > +#define qemu_atomic_rcu_read__nocheck(ptr, valptr) \ > __atomic_load(ptr, valptr,

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread David Hildenbrand
On 22.09.20 08:56, Paolo Bonzini wrote: > On 22/09/20 08:45, David Hildenbrand wrote: >>> It's certainly a good idea but it's quite verbose. >>> >>> What about using atomic__* as the prefix? It is not very common in QEMU >>> but there are some cases (and I cannot think of anything better). >> >>

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Paolo Bonzini
On 22/09/20 08:45, David Hildenbrand wrote: >> It's certainly a good idea but it's quite verbose. >> >> What about using atomic__* as the prefix? It is not very common in QEMU >> but there are some cases (and I cannot think of anything better). > > aqomic_*, lol :) Actually qatomic_ would be a

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread David Hildenbrand
On 22.09.20 08:27, Paolo Bonzini wrote: > On 21/09/20 18:23, Stefan Hajnoczi wrote: >> clang's C11 atomic_fetch_*() functions only take a C11 atomic type >> pointer argument. QEMU uses direct types (int, etc) and this causes a >> compiler error when a QEMU code calls these functions in a source

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-22 Thread Paolo Bonzini
On 21/09/20 18:23, Stefan Hajnoczi wrote: > clang's C11 atomic_fetch_*() functions only take a C11 atomic type > pointer argument. QEMU uses direct types (int, etc) and this causes a > compiler error when a QEMU code calls these functions in a source file > that also included via a system header

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-21 Thread Eric Blake
On 9/21/20 11:23 AM, Stefan Hajnoczi wrote: clang's C11 atomic_fetch_*() functions only take a C11 atomic type pointer argument. QEMU uses direct types (int, etc) and this causes a compiler error when a QEMU code calls these functions in a source file that also included via a system header